X-Git-Url: http://git.osdn.net/view?p=bytom%2Fvapor.git;a=blobdiff_plain;f=protocol%2Ftxpool_test.go;h=a9e458395db46dba8bbd4c1ac64a4b88485d6c29;hp=05eff7f4eb1f21b3715538694078f629a3c35612;hb=04e99309457c70c11b0538e38b6a0b68d5b64a87;hpb=53784d9c76f1056423b57915f7e064a6f551100c diff --git a/protocol/txpool_test.go b/protocol/txpool_test.go index 05eff7f4..a9e45839 100644 --- a/protocol/txpool_test.go +++ b/protocol/txpool_test.go @@ -117,9 +117,11 @@ func (s *mockStore) GetStoreStatus() *BlockStoreState func (s *mockStore) GetTransactionStatus(*bc.Hash) (*bc.TransactionStatus, error) { return nil, nil } func (s *mockStore) GetTransactionsUtxo(*state.UtxoViewpoint, []*bc.Tx) error { return nil } func (s *mockStore) GetUtxo(*bc.Hash) (*storage.UtxoEntry, error) { return nil, nil } +func (s *mockStore) GetVoteResult(uint64) (*state.VoteResult, error) { return nil, nil } func (s *mockStore) LoadBlockIndex(uint64) (*state.BlockIndex, error) { return nil, nil } func (s *mockStore) SaveBlock(*types.Block, *bc.TransactionStatus) error { return nil } -func (s *mockStore) SaveChainStatus(*state.BlockNode, *state.UtxoViewpoint) error { return nil } +func (s *mockStore) SaveChainStatus(*state.BlockNode, *state.BlockNode, *state.UtxoViewpoint, map[uint64]*state.VoteResult) error { return nil } +func (s *mockStore) SaveChainNodeStatus(*state.BlockNode, *state.BlockNode) error { return nil } func TestAddOrphan(t *testing.T) { cases := []struct { @@ -661,9 +663,11 @@ func (s *mockStore1) GetTransactionsUtxo(utxoView *state.UtxoViewpoint, tx []*bc return nil } func (s *mockStore1) GetUtxo(*bc.Hash) (*storage.UtxoEntry, error) { return nil, nil } +func (s *mockStore1) GetVoteResult(uint64) (*state.VoteResult, error) { return nil, nil } func (s *mockStore1) LoadBlockIndex(uint64) (*state.BlockIndex, error) { return nil, nil } func (s *mockStore1) SaveBlock(*types.Block, *bc.TransactionStatus) error { return nil } -func (s *mockStore1) SaveChainStatus(*state.BlockNode, *state.UtxoViewpoint) error { return nil } +func (s *mockStore1) SaveChainStatus(*state.BlockNode, *state.BlockNode, *state.UtxoViewpoint, map[uint64]*state.VoteResult) error { return nil } +func (s *mockStore1) SaveChainNodeStatus(*state.BlockNode, *state.BlockNode) error { return nil } func TestProcessTransaction(t *testing.T) { txPool := &TxPool{