From 7fbe8e47d46c8da547f714624ca0f5d09aef3230 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Mon, 10 Apr 2017 17:32:48 -0400 Subject: [PATCH] fix tests --- rpc/client/mock/abci.go | 4 ++-- state/execution_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rpc/client/mock/abci.go b/rpc/client/mock/abci.go index 13e18741..6f6fa1d4 100644 --- a/rpc/client/mock/abci.go +++ b/rpc/client/mock/abci.go @@ -45,7 +45,7 @@ func (a ABCIApp) BroadcastTxAsync(tx types.Tx) (*ctypes.ResultBroadcastTx, error if c.IsOK() { go func() { a.App.DeliverTx(tx) }() } - return &ctypes.ResultBroadcastTx{c.Code, c.Data, c.Log}, nil + return &ctypes.ResultBroadcastTx{c.Code, c.Data, c.Log, tx.Hash()}, nil } func (a ABCIApp) BroadcastTxSync(tx types.Tx) (*ctypes.ResultBroadcastTx, error) { @@ -54,7 +54,7 @@ func (a ABCIApp) BroadcastTxSync(tx types.Tx) (*ctypes.ResultBroadcastTx, error) if c.IsOK() { go func() { a.App.DeliverTx(tx) }() } - return &ctypes.ResultBroadcastTx{c.Code, c.Data, c.Log}, nil + return &ctypes.ResultBroadcastTx{c.Code, c.Data, c.Log, tx.Hash()}, nil } // ABCIMock will send all abci related request to the named app, diff --git a/state/execution_test.go b/state/execution_test.go index 7e0b7332..8b9cf4a7 100644 --- a/state/execution_test.go +++ b/state/execution_test.go @@ -81,7 +81,7 @@ type dummyIndexer struct { Indexed int } -func (indexer *dummyIndexer) Tx(hash string) (*types.TxResult, error) { +func (indexer *dummyIndexer) Tx(hash []byte) (*types.TxResult, error) { return nil, nil } func (indexer *dummyIndexer) Batch(batch *txindexer.Batch) error {