MCPcopy
hub / github.com/bnb-chain/bsc / TestNegativeValue

Function TestNegativeValue

core/txpool/legacypool/legacypool_test.go:417–429  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

415}
416
417func TestNegativeValue(t *testing.T) {
418 t.Parallel()
419
420 pool, key := setupPool()
421 defer pool.Close()
422
423 tx, _ := types.SignTx(types.NewTransaction(0, common.Address{}, big.NewInt(-1), 100, big.NewInt(1), nil), types.HomesteadSigner{}, key)
424 from, _ := deriveSender(tx)
425 testAddBalance(pool, from, big.NewInt(1))
426 if err := pool.addRemote(tx); err != txpool.ErrNegativeValue {
427 t.Error("expected", txpool.ErrNegativeValue, "got", err)
428 }
429}
430
431func TestTipAboveFeeCap(t *testing.T) {
432 t.Parallel()

Callers

nothing calls this directly

Calls 8

SignTxFunction · 0.92
NewTransactionFunction · 0.92
setupPoolFunction · 0.85
deriveSenderFunction · 0.85
testAddBalanceFunction · 0.85
addRemoteMethod · 0.80
CloseMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected