}
gasOnlyTx := false
- if err != nil && status.GasVaild {
+ if err != nil && status.GasValid {
gasOnlyTx = true
}
if gasOnlyTx != t.GasOnly {
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 {
t.Fatal(err)
}
- err = SolveAndUpdate(chain, block)
- if err == nil {
+ if err := SolveAndUpdate(chain, block); err == nil {
t.Fatalf("invalid coinbase tx validate success")
}
}