mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 20:56:42 +00:00
Add 1gwei tip; handle two pooled tx requests; fix disconnection detection
This commit is contained in:
parent
55a53208b7
commit
5b2caa9d14
1 changed files with 11 additions and 4 deletions
|
|
@ -34,6 +34,7 @@ import (
|
|||
"github.com/ethereum/go-ethereum/internal/utesting"
|
||||
"github.com/ethereum/go-ethereum/p2p"
|
||||
"github.com/ethereum/go-ethereum/p2p/enode"
|
||||
"github.com/ethereum/go-ethereum/params"
|
||||
"github.com/holiman/uint256"
|
||||
)
|
||||
|
||||
|
|
@ -188,8 +189,8 @@ to check if the node disconnects after receiving multiple invalid requests.`)
|
|||
|
||||
// Check if peer disconnects at the end.
|
||||
code, _, err := conn.Read()
|
||||
if err == errDisc || code == discMsg {
|
||||
t.Fatal("peer improperly disconnected")
|
||||
if err != errDisc && code != discMsg {
|
||||
t.Fatal("peer improperly disconnected", err, errDisc, code, discMsg)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -912,8 +913,8 @@ func (s *Suite) makeBlobTxs(count, blobs int, discriminator byte) (txs types.Tra
|
|||
inner := &types.BlobTx{
|
||||
ChainID: uint256.MustFromBig(s.chain.config.ChainID),
|
||||
Nonce: nonce + uint64(i),
|
||||
GasTipCap: uint256.NewInt(1),
|
||||
GasFeeCap: uint256.MustFromBig(s.chain.Head().BaseFee()),
|
||||
GasTipCap: uint256.NewInt(params.GWei),
|
||||
GasFeeCap: new(uint256.Int).Add(uint256.MustFromBig(s.chain.Head().BaseFee()), uint256.NewInt(+params.GWei)),
|
||||
Gas: 100000,
|
||||
BlobFeeCap: uint256.MustFromBig(eip4844.CalcBlobFee(s.chain.config, s.chain.Head().Header())),
|
||||
BlobHashes: makeSidecar(blobdata...).BlobHashes(),
|
||||
|
|
@ -990,6 +991,12 @@ func (s *Suite) TestBlobViolations(t *utesting.T) {
|
|||
t.Fatalf("expected disconnect on blob violation, got err on second read: %v", err)
|
||||
}
|
||||
}
|
||||
if code == protoOffset(ethProto)+eth.GetPooledTransactionsMsg {
|
||||
// due to maxTxPacketSize limit there can be two requests for pooled transactions
|
||||
if code, _, err = conn.Read(); err != nil {
|
||||
t.Fatalf("expected disconnect on blob violation, got err on second read: %v", err)
|
||||
}
|
||||
}
|
||||
if code != discMsg {
|
||||
t.Fatalf("expected disconnect on blob violation, got msg code: %d", code)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue