diff options
author | obscuren <geffobscura@gmail.com> | 2015-02-01 00:22:17 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-02-01 00:22:17 +0800 |
commit | cb382fa76ba30d213e4707d05bf3a00bc87dec9a (patch) | |
tree | 158717a954fc3321c86930d8c6844d92ce4b7750 /core/transaction_pool_test.go | |
parent | 0dfe5113709d2981ef2ec8885d831a38cf2e4f91 (diff) | |
download | dexon-cb382fa76ba30d213e4707d05bf3a00bc87dec9a.tar dexon-cb382fa76ba30d213e4707d05bf3a00bc87dec9a.tar.gz dexon-cb382fa76ba30d213e4707d05bf3a00bc87dec9a.tar.bz2 dexon-cb382fa76ba30d213e4707d05bf3a00bc87dec9a.tar.lz dexon-cb382fa76ba30d213e4707d05bf3a00bc87dec9a.tar.xz dexon-cb382fa76ba30d213e4707d05bf3a00bc87dec9a.tar.zst dexon-cb382fa76ba30d213e4707d05bf3a00bc87dec9a.zip |
Validate transactions sender before adding to pool. Closes #272
Diffstat (limited to 'core/transaction_pool_test.go')
-rw-r--r-- | core/transaction_pool_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/transaction_pool_test.go b/core/transaction_pool_test.go index 7f192fc4d..b2d981f01 100644 --- a/core/transaction_pool_test.go +++ b/core/transaction_pool_test.go @@ -85,3 +85,13 @@ func TestRemoveInvalid(t *testing.T) { t.Error("expected pool size to be 1, is", pool.Size()) } } + +func TestInvalidSender(t *testing.T) { + pool, _ := setup() + tx := new(types.Transaction) + tx.V = 28 + err := pool.ValidateTransaction(tx) + if err != ErrInvalidSender { + t.Error("expected %v, got %v", ErrInvalidSender, err) + } +} |