OSDN Git Service

fix test coinbase tx immature
authorlbqds <lbqds@outlook.com>
Sun, 22 Apr 2018 05:00:41 +0000 (13:00 +0800)
committerlbqds <lbqds@outlook.com>
Sun, 22 Apr 2018 05:00:41 +0000 (13:00 +0800)
test/tx_test.go

index d879cfe..c773454 100644 (file)
@@ -172,6 +172,10 @@ func TestCoinbaseMature(t *testing.T) {
        chain, _, _, _ := MockChain(db)
 
        defaultCtrlProg := []byte{byte(vm.OP_TRUE)}
+       if err := AppendBlocks(chain, 1); err != nil {
+               t.Fatal(err)
+       }
+
        height := chain.BestBlockHeight()
        block, err := chain.GetBlockByHeight(height)
        if err != nil {