aboutsummaryrefslogtreecommitdiffstats
path: root/core/transaction_pool_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/transaction_pool_test.go')
-rw-r--r--core/transaction_pool_test.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/core/transaction_pool_test.go b/core/transaction_pool_test.go
index 418cb0415..bf9012573 100644
--- a/core/transaction_pool_test.go
+++ b/core/transaction_pool_test.go
@@ -4,10 +4,10 @@ import (
"crypto/ecdsa"
"testing"
+ "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethdb"
- "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/state"
)
@@ -21,11 +21,11 @@ func SQ() stateQuery {
}
func (self stateQuery) GetAccount(addr []byte) *state.StateObject {
- return state.NewStateObject(addr, self.db)
+ return state.NewStateObject(common.BytesToAddress(addr), self.db)
}
func transaction() *types.Transaction {
- return types.NewTransactionMessage(make([]byte, 20), common.Big0, common.Big0, common.Big0, nil)
+ return types.NewTransactionMessage(common.Address{}, common.Big0, common.Big0, common.Big0, nil)
}
func setup() (*TxPool, *ecdsa.PrivateKey) {
@@ -88,10 +88,8 @@ func TestRemoveInvalid(t *testing.T) {
func TestInvalidSender(t *testing.T) {
pool, _ := setup()
- tx := new(types.Transaction)
- tx.V = 28
- err := pool.ValidateTransaction(tx)
+ err := pool.ValidateTransaction(new(types.Transaction))
if err != ErrInvalidSender {
- t.Error("expected %v, got %v", ErrInvalidSender, err)
+ t.Errorf("expected %v, got %v", ErrInvalidSender, err)
}
}