(t *testing.T)
| 316 | } |
| 317 | |
| 318 | func TestTransactionNegativeValue(t *testing.T) { |
| 319 | t.Parallel() |
| 320 | |
| 321 | pool, key := setupTxPool() |
| 322 | defer pool.Stop() |
| 323 | |
| 324 | tx, _ := types.SignTx(types.NewTransaction(0, common.Address{}, big.NewInt(-1), 100, big.NewInt(1), nil), types.HomesteadSigner{}, key) |
| 325 | from, _ := deriveSender(tx) |
| 326 | pool.currentState.AddBalance(from, big.NewInt(1)) |
| 327 | if err := pool.AddRemote(tx); err != ErrNegativeValue { |
| 328 | t.Error("expected", ErrNegativeValue, "got", err) |
| 329 | } |
| 330 | } |
| 331 | |
| 332 | func TestTransactionChainFork(t *testing.T) { |
| 333 | t.Parallel() |
nothing calls this directly
no test coverage detected