Documentation
¶
Index ¶
- Constants
- func AppendHashToFile(filename string, hash common.Hash) error
- func AppendToFile(filename, content string) error
- func EnsureDir(dirPath string) error
- func FileExists(filename string) bool
- func GetNonceWithRetry(client *ethclient.Client, address common.Address, maxRetries int) (uint64, error)
- func InitHashFile(filename, nodeName string) error
- func ParseJWTSecretFromHexString(hexString string) ([]byte, error)
- func ParseNonceValue(value string) (uint64, bool, error)
- func PrintHeaders(headers *eth.BlockHeadersPacket)
- func PrintPooledTransactions(resp eth.PooledTransactionsResponse)
- func PrintProgress(current, total int, message string)
- func PrintReceipts(receipts []*eth.ReceiptList68)
- func PrintSeparator()
- func PrintSingleReceipt(receipt *types.Receipt, index int)
- func PrintTestSummary(testName string, stats map[string]interface{})
- func PrintTransaction(tx *types.Transaction)
- func ResolveNonce(client *ethclient.Client, nonceStr string, address common.Address) (uint64, error)
- func ResolveNonceList(client *ethclient.Client, nonceStrs []string, addresses []common.Address) ([]uint64, error)
- func WriteHashesToFile(hashes []common.Hash, filename string) error
- func WriteStringToFile(filename, content string) error
- type Logger
- func (l *Logger) Close() error
- func (l *Logger) Debug(format string, v ...interface{})
- func (l *Logger) Error(format string, v ...interface{})
- func (l *Logger) Fatal(format string, v ...interface{})
- func (l *Logger) Info(format string, v ...interface{})
- func (l *Logger) Warn(format string, v ...interface{})
Constants ¶
const ( // MaxNonceRetries is the maximum number of retry attempts for nonce retrieval MaxNonceRetries = 3 // NonceRetryTimeout is the timeout for each nonce retrieval attempt NonceRetryTimeout = 10 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func AppendHashToFile ¶
AppendHashToFile appends a single hash to the file
func AppendToFile ¶
AppendToFile appends content to file
func GetNonceWithRetry ¶
func GetNonceWithRetry(client *ethclient.Client, address common.Address, maxRetries int) (uint64, error)
GetNonceWithRetry gets nonce from the network with retry mechanism Based on fuzzer/tx_fuzzer.go implementation
func InitHashFile ¶
InitHashFile initializes a hash file with a node name header
func ParseJWTSecretFromHexString ¶
parseJWTSecretFromHexString parses hexadecimal string directly
func ParseNonceValue ¶
ParseNonceValue parses a nonce string value Returns (nonce, isAuto, error) - If value is "auto", returns (0, true, nil) - If value is numeric, returns (parsed_value, false, nil) - Otherwise returns (0, false, error)
func PrintHeaders ¶
func PrintHeaders(headers *eth.BlockHeadersPacket)
PrintHeaders prints block headers
func PrintPooledTransactions ¶
func PrintPooledTransactions(resp eth.PooledTransactionsResponse)
PrintPooledTransactions prints pooled transactions response
func PrintProgress ¶
PrintProgress prints a progress indicator
func PrintReceipts ¶
func PrintReceipts(receipts []*eth.ReceiptList68)
PrintReceipts prints receipts
func PrintSingleReceipt ¶
PrintSingleReceipt prints a single receipt
func PrintTestSummary ¶
PrintTestSummary prints a formatted test summary
func PrintTransaction ¶
func PrintTransaction(tx *types.Transaction)
PrintTransaction prints transaction details
func ResolveNonce ¶
func ResolveNonce(client *ethclient.Client, nonceStr string, address common.Address) (uint64, error)
ResolveNonce resolves a nonce string to an actual nonce value - If nonceStr is "auto", retrieves nonce from the network - If nonceStr is numeric, parses and returns it - Returns error if unable to resolve
func ResolveNonceList ¶
func ResolveNonceList(client *ethclient.Client, nonceStrs []string, addresses []common.Address) ([]uint64, error)
ResolveNonceList resolves a list of nonce strings for multiple accounts Returns a list of resolved nonces or error
func WriteHashesToFile ¶
WriteHashesToFile writes transaction hashes to the specified file The first hash overwrites the file, subsequent hashes are appended to the end of the file
func WriteStringToFile ¶
WriteStringToFile writes string content to a file (overwrites if exists)
Types ¶
type Logger ¶
Logger wraps the standard logger with file output