Documentation ¶
Overview ¶
Copyright 2023 The go-ethereum Authors This file is part of go-ethereum.
go-ethereum is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
go-ethereum is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- type Addresses
- type Chain
- func (c *Chain) AccountsInHashOrder() []state.DumpAccount
- func (c *Chain) Balance(addr common.Address) *big.Int
- func (c *Chain) CodeHashes() []common.Hash
- func (c *Chain) ForkID() forkid.ID
- func (c *Chain) GetBlock(number int) *types.Block
- func (c *Chain) GetHeaders(req *eth.GetBlockHeadersPacket) ([]*types.Header, error)
- func (c *Chain) GetSender(idx int) (common.Address, uint64)
- func (c *Chain) Head() *types.Block
- func (c *Chain) IncNonce(addr common.Address, amt uint64)
- func (c *Chain) Len() int
- func (c *Chain) RootAt(height int) common.Hash
- func (c *Chain) Shorten(height int) *Chain
- func (c *Chain) SignTx(from common.Address, tx *types.Transaction) (*types.Transaction, error)
- func (c *Chain) TD() *big.Int
- type Conn
- type EngineClient
- type Hello
- type Proto
- type Suite
- func (s *Suite) EthTests() []utesting.Test
- func (s *Suite) SnapTests() []utesting.Test
- func (s *Suite) TestBlobViolations(t *utesting.T)
- func (s *Suite) TestGetBlockBodies(t *utesting.T)
- func (s *Suite) TestGetBlockHeaders(t *utesting.T)
- func (s *Suite) TestInvalidTxs(t *utesting.T)
- func (s *Suite) TestLargeTxRequest(t *utesting.T)
- func (s *Suite) TestMaliciousHandshake(t *utesting.T)
- func (s *Suite) TestMaliciousStatus(t *utesting.T)
- func (s *Suite) TestNewPooledTxs(t *utesting.T)
- func (s *Suite) TestSameRequestID(t *utesting.T)
- func (s *Suite) TestSimultaneousRequests(t *utesting.T)
- func (s *Suite) TestSnapGetAccountRange(t *utesting.T)
- func (s *Suite) TestSnapGetByteCodes(t *utesting.T)
- func (s *Suite) TestSnapGetStorageRanges(t *utesting.T)
- func (s *Suite) TestSnapStatus(t *utesting.T)
- func (s *Suite) TestSnapTrieNodes(t *utesting.T)
- func (s *Suite) TestStatus(t *utesting.T)
- func (s *Suite) TestTransaction(t *utesting.T)
- func (s *Suite) TestZeroRequestID(t *utesting.T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
Chain is a lightweight blockchain-like store which can read a hivechain created chain.
func NewChain ¶ added in v1.13.8
NewChain takes the given chain.rlp file, and decodes and returns the blocks from the file.
func (*Chain) AccountsInHashOrder ¶ added in v1.13.8
func (c *Chain) AccountsInHashOrder() []state.DumpAccount
AccountsInHashOrder returns all accounts of the head state, ordered by hash of address.
func (*Chain) Balance ¶ added in v1.13.8
Balance returns the balance of an account at the head of the chain.
func (*Chain) CodeHashes ¶ added in v1.13.8
CodeHashes returns all bytecode hashes contained in the head state.
func (*Chain) GetHeaders ¶ added in v1.9.23
GetHeaders returns the headers base on an ethGetPacketHeadersPacket.
func (*Chain) GetSender ¶ added in v1.13.8
GetSender returns the address associated with account at the index in the pre-funded accounts list.
func (*Chain) IncNonce ¶ added in v1.13.8
IncNonce increases the specified signing account's pending nonce.
func (*Chain) RootAt ¶ added in v1.10.16
RootAt returns the state root for the block at the given height.
func (*Chain) SignTx ¶ added in v1.13.8
func (c *Chain) SignTx(from common.Address, tx *types.Transaction) (*types.Transaction, error)
SignTx signs a transaction for the specified from account, so long as that account was in the hivechain accounts dump.
type Conn ¶
Conn represents an individual connection with a peer
func (*Conn) ReadMsg ¶ added in v1.13.8
ReadMsg attempts to read a devp2p message with a specific code.
type EngineClient ¶ added in v1.13.8
type EngineClient struct {
// contains filtered or unexported fields
}
EngineClient is a wrapper around engine-related data.
func NewEngineClient ¶ added in v1.13.8
func NewEngineClient(dir, url, jwt string) (*EngineClient, error)
NewEngineClient creates a new engine client.
type Suite ¶
Suite represents a structure used to test a node's conformance to the eth protocol.
func NewSuite ¶
NewSuite creates and returns a new eth-test suite that can be used to test the given node against the given blockchain data.
func (*Suite) TestBlobViolations ¶ added in v1.13.8
func (*Suite) TestGetBlockBodies ¶
func (*Suite) TestGetBlockHeaders ¶
func (*Suite) TestInvalidTxs ¶ added in v1.13.8
func (*Suite) TestLargeTxRequest ¶ added in v1.10.22
func (*Suite) TestMaliciousHandshake ¶ added in v1.9.25
func (*Suite) TestMaliciousStatus ¶ added in v1.9.25
func (*Suite) TestNewPooledTxs ¶ added in v1.10.22
func (*Suite) TestSameRequestID ¶ added in v1.10.22
func (*Suite) TestSimultaneousRequests ¶ added in v1.10.22
func (*Suite) TestSnapGetAccountRange ¶ added in v1.10.16
TestSnapGetAccountRange various forms of GetAccountRange requests.
func (*Suite) TestSnapGetByteCodes ¶ added in v1.10.16
TestSnapGetByteCodes various forms of GetByteCodes requests.
func (*Suite) TestSnapGetStorageRanges ¶ added in v1.10.16
TestSnapGetStorageRanges various forms of GetStorageRanges requests.
func (*Suite) TestSnapStatus ¶ added in v1.10.16
func (*Suite) TestSnapTrieNodes ¶ added in v1.10.16
TestSnapTrieNodes various forms of GetTrieNodes requests.