Skip to content

Commit a46ce7c

Browse files
feat: data length field
Adding a note in the transaction of how big the input data is
1 parent 5b3b453 commit a46ce7c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

README.org

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,8 @@ we'll startup geth.
341341

342342
#+begin_src shell
343343
# Geth
344-
./build/bin/geth --dev --dev.period 2 --http --http.addr localhost --http.port 8545 --http.api eth,web3,personal,net --verbosity 5
344+
./build/bin/geth --dev --dev.period 2 --http --http.addr localhost --http.port 8545 --http.api eth,web3,personal,net --verbosity 5 --rpc.gascap 18446744073709551615 --rpc.txfeecap 0 --miner.gaslimit 10 --miner.gasprice 1 --gpo.blocks 1 --gpo.percentile 1 --gpo.maxprice 10 --gpo.ignoreprice 2
345+
345346

346347
# v3
347348
go run cmd/borv3/main.go server --dev \

metrics/metrics.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,7 @@ func GetSimpleTxFields(tx rpctypes.PolyTransaction, chainID, baseFee *big.Int) [
227227
fields = append(fields, fmt.Sprintf("Tx Hash: %s", tx.Hash()))
228228

229229
txMethod := "Transfer"
230-
if tx.To().String() == "" {
231-
// TODO DOUBLE CHECK THIS!!!!!!!!!!!!!!
230+
if tx.To().String() == "0x0000000000000000000000000000000000000000" {
232231
// Contract deployment
233232
txMethod = "Contract Deployment"
234233
} else if len(tx.Data()) > 4 {
@@ -243,6 +242,7 @@ func GetSimpleTxFields(tx rpctypes.PolyTransaction, chainID, baseFee *big.Int) [
243242
fields = append(fields, fmt.Sprintf("Gas: %d", tx.Gas()))
244243
fields = append(fields, fmt.Sprintf("Gas Price: %s", tx.GasPrice()))
245244
fields = append(fields, fmt.Sprintf("Nonce: %d", tx.Nonce()))
245+
fields = append(fields, fmt.Sprintf("Data Len: %d", len(tx.Data())))
246246
fields = append(fields, fmt.Sprintf("Data: %s", hex.EncodeToString(tx.Data())))
247247

248248
return fields

0 commit comments

Comments
 (0)