Skip to content

Instantly share code, notes, and snippets.

@stackdump
Created September 20, 2019 12:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stackdump/7bbc2114d288e2c0c8b8138c1140119f to your computer and use it in GitHub Desktop.
Save stackdump/7bbc2114d288e2c0c8b8138c1140119f to your computer and use it in GitHub Desktop.
package simtest
import (
"testing"
"github.com/FactomProject/factomd/engine"
. "github.com/FactomProject/factomd/testHelper"
)
/*
*/
func TestMissingData(t *testing.T) {
ResetSimHome(t) // clear out old test home
state0 := SetupSim("LF", map[string]string{"--debuglog": ".", "--blktime": "15"}, 25, 1, 1, t)
WaitForBlock(state0, 2)
RunCmd("1")
RunCmd("x") // take node1 offline
RunCmd("R30") // generate entries
WaitForBlock(state0, 12)
RunCmd("1") // bring node1 online
RunCmd("x")
state1 := engine.GetFnodes()[1].State // Get new node
WaitForBlock(state1, 20)
// TODO: improve test to assert missing data was received
Halt(t)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment