bc.Hash{V0: 1, V1: 1, V2: 3, V3: 4}: &storage.UtxoEntry{Type: storage.NormalUTXOType, BlockHeight: 100, Spent: true},
bc.Hash{V0: 1, V1: 1, V2: 3, V3: 5}: &storage.UtxoEntry{Type: storage.CrosschainUTXOType, BlockHeight: 100, Spent: false},
bc.Hash{V0: 1, V1: 1, V2: 3, V3: 6}: &storage.UtxoEntry{Type: storage.CrosschainUTXOType, BlockHeight: 100, Spent: true},
+ bc.Hash{V0: 1, V1: 3, V2: 3, V3: 7}: &storage.UtxoEntry{Type: storage.VoteUTXOType, BlockHeight: 100, Spent: false},
+ bc.Hash{V0: 1, V1: 3, V2: 3, V3: 7}: &storage.UtxoEntry{Type: storage.VoteUTXOType, BlockHeight: 100, Spent: true},
},
}
- if err := store.SaveChainStatus(node, node, view, map[uint64]*state.VoteResult{}); err != nil {
+ if err := store.SaveChainStatus(node, node, view, []*state.VoteResult{}); err != nil {
t.Fatal(err)
}
if (utxo.Type == storage.CrosschainUTXOType) && (!utxo.Spent) {
continue
}
+ if (utxo.Type == storage.VoteUTXOType) && (utxo.Spent) {
+ continue
+ }
gotUtxo, err := store.GetUtxo(&hash)
if err != nil {
}
blockHash := block.Hash()
- gotBlock, err := store.GetBlock(&blockHash)
+ gotBlock, err := store.GetBlock(&blockHash, block.Height)
if err != nil {
t.Fatal(err)
}