Documentation ¶
Index ¶
- type Filler
- func (f *Filler) BigInt16() *big.Int
- func (f *Filler) BigInt256() *big.Int
- func (f *Filler) BigInt32() *big.Int
- func (f *Filler) BigInt64() *big.Int
- func (f *Filler) Bool() bool
- func (f *Filler) Byte() byte
- func (f *Filler) ByteSlice(items int) []byte
- func (f *Filler) ByteSlice256() []byte
- func (f *Filler) FillAmount() uint64
- func (f *Filler) FillChallengeData() []byte
- func (f *Filler) FillDistances() []uint
- func (f *Filler) FillENRRecords(count int) []*enr.Record
- func (f *Filler) FillENRSeq() uint64
- func (f *Filler) FillExpiration() uint64
- func (f *Filler) FillForkID() forkid.ID
- func (f *Filler) FillGasCap() *big.Int
- func (f *Filler) FillHash() [32]byte
- func (f *Filler) FillIP() net.IP
- func (f *Filler) FillMessage() []byte
- func (f *Filler) FillNetworkID() uint64
- func (f *Filler) FillNode() *enode.Node
- func (f *Filler) FillNonce() Nonce
- func (f *Filler) FillPort() int
- func (f *Filler) FillProtocolVersion() uint32
- func (f *Filler) FillPubkey() Pubkey
- func (f *Filler) FillReplyToken() []byte
- func (f *Filler) FillReqID() []byte
- func (f *Filler) FillRequestId() uint64
- func (f *Filler) FillRest() []rlp.RawValue
- func (f *Filler) FillTD() *big.Int
- func (f *Filler) FillTime() uint64
- func (f *Filler) GasInt() *big.Int
- func (f *Filler) MemInt() *big.Int
- func (f *Filler) Read(b []byte) (n int, err error)
- func (f *Filler) Reset()
- func (f *Filler) Uint16() uint16
- func (f *Filler) Uint32() uint32
- func (f *Filler) Uint64() uint64
- func (f *Filler) UsedUp() bool
- type Nonce
- type Pubkey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filler ¶
type Filler struct {
// contains filtered or unexported fields
}
Filler can be used to fill objects from a data source.
func (*Filler) ByteSlice256 ¶
ByteSlice256 returns a byteslice with 0..255 values.
func (*Filler) FillAmount ¶
FillAmount generates a random amount for BlockHeader requests.
func (*Filler) FillChallengeData ¶
FillChallengeData generates random challenge data.
func (*Filler) FillDistances ¶
FillDistances generates random distances for Findnode.
func (*Filler) FillENRRecords ¶
FillENRRecords generates random ENR records.
func (*Filler) FillENRSeq ¶
FillENRSeq generates a random ENR sequence number.
func (*Filler) FillExpiration ¶
FillExpiration fills the expiration field with a random uint64 value.
func (*Filler) FillForkID ¶
FillForkID generates a new forkid.ID using random data from the filler.
func (*Filler) FillGasCap ¶
FillGasCap generates random gas cap values.
func (*Filler) FillMessage ¶
FillMessage generates a random message.
func (*Filler) FillNetworkID ¶
FillNetworkID fills the NetworkID field.
func (*Filler) FillProtocolVersion ¶
FillProtocolVersion fills the ProtocolVersion field.
func (*Filler) FillPubkey ¶
FillPubkey fills the Pubkey field with a random 64-byte value.
func (*Filler) FillReplyToken ¶
FillReplyToken generates a random reply token.
func (*Filler) FillRequestId ¶
FillRequestId generates a random request ID for network requests.
func (*Filler) GasInt ¶
GasInt returns a new big int to be used as a gas value. With probability 254/255 its in [0, 20.000.000]. With probability 1/255 its in [0, 2^32].
func (*Filler) MemInt ¶
MemInt returns a new big int to be used as a memory or offset value. With probability 252/255 its in [0, 256]. With probability 1/255 its in [0, 2^32]. With probability 1/255 its in [0, 2^64]. With probability 1/255 its in [0, 2^256].