6 "github.com/bytom/consensus"
7 "github.com/bytom/consensus/difficulty"
11 func TestGenerateGenesisTx(t *testing.T) {
12 if tx := GenerateGenesisTx(); tx == nil {
13 t.Errorf("Generate genesis tx failed")
17 func TestGenerateGenesisBlock(t *testing.T) {
18 block := GenerateGenesisBlock()
22 if difficulty.CheckProofOfWork(&hash, consensus.InitialSeed, block.Bits) {
27 if block.Nonce != nonce {
28 t.Errorf("correct nonce is %d, but get %d", block.Nonce, nonce)