Skip to content

Commit a8f2ba4

Browse files
author
Darioush Jalali
committed
remove TODO comments
1 parent bb1ce2e commit a8f2ba4

File tree

8 files changed

+7
-9
lines changed

8 files changed

+7
-9
lines changed

core/blockchain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ func (bc *BlockChain) stopWithoutSaving() {
935935
}
936936

937937
log.Info("Closing quit channel")
938-
close(bc.quit) // XXX: Why is this closed before [scope] but it's opposite upstream?
938+
close(bc.quit)
939939
// Wait for accepted feed to process all remaining items
940940
log.Info("Stopping Acceptor")
941941
start := time.Now()

core/txindexer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func newTxIndexer(limit uint64, chain *BlockChain) *txIndexer {
6565
}
6666
chain.wg.Add(1)
6767
var (
68-
headCh = make(chan ChainEvent, 1) // XXX: Buffered to avoid locking up the event feed
68+
headCh = make(chan ChainEvent, 1)
6969
sub = chain.SubscribeChainAcceptedEvent(headCh)
7070
)
7171
go func() {

core/txindexer_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import (
3131
"github.com/stretchr/testify/require"
3232
)
3333

34-
// XXX: These tests are moved from blockchain_test.go here.
3534
// Should we try to use the TestTxIndexer from upstream here instead
3635
// or move this test to a new file eg, blockchain_extra_test.go?
3736
func TestTransactionIndices(t *testing.T) {

ethclient/simulated/backend.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ func NewBackend(alloc types.GenesisAlloc, options ...func(nodeConf *node.Config,
9797
ethConf.AllowUnfinalizedQueries = true
9898
ethConf.Miner.Etherbase = constants.BlackholeAddr
9999
ethConf.Miner.AllowDuplicateBlocks = true
100-
ethConf.GPO.MinPrice = new(big.Int).SetUint64(ethConf.TxPool.PriceLimit) // XXX: this constraint should be enforced
101100
ethConf.TxPool.NoLocals = true
102101

103102
for _, option := range options {

params/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ var (
5656
ConstantinopleBlock: big.NewInt(0),
5757
PetersburgBlock: big.NewInt(0),
5858
IstanbulBlock: big.NewInt(0),
59-
MuirGlacierBlock: big.NewInt(0), // XXX: Should this include Cancun time?
59+
MuirGlacierBlock: big.NewInt(0),
6060
NetworkUpgrades: getDefaultNetworkUpgrades(constants.MainnetID), // This can be changed to correct network (local, test) via VM.
6161
GenesisPrecompiles: Precompiles{},
6262
}
@@ -236,7 +236,7 @@ func (c *ChainConfig) Description() string {
236236
}
237237

238238
banner += "Hard forks (timestamp based):\n"
239-
banner += fmt.Sprintf(" - Cancun Timestamp: @%-10v (https://github.com/ava-labs/avalanchego/releases/tag/v1.12.0)\n", ptrToString(c.CancunTime)) /// XXX: should we link the ethereum execution spec here instead
239+
banner += fmt.Sprintf(" - Cancun Timestamp: @%-10v (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/cancun.md)\n", ptrToString(c.CancunTime))
240240
banner += fmt.Sprintf(" - Verkle Timestamp: @%-10v", ptrToString(c.VerkleTime))
241241

242242
banner += "Avalanche Upgrades (timestamp based):\n"

precompile/contracts/nativeminter/contract.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func mintNativeCoin(accessibleState contract.AccessibleState, caller common.Addr
118118
stateDB.CreateAccount(to)
119119
}
120120

121-
amountU256, _ := uint256.FromBig(amount) // XXX: should we check overflow?
121+
amountU256, _ := uint256.FromBig(amount)
122122
stateDB.AddBalance(to, amountU256)
123123
// Return an empty output and the remaining gas
124124
return []byte{}, remainingGas, nil

precompile/contracts/nativeminter/module.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func (*configurator) Configure(chainConfig precompileconfig.ChainConfig, cfg pre
5454
for to, amount := range config.InitialMint {
5555
if amount != nil {
5656
amountBig := (*big.Int)(amount)
57-
amountU256, _ := uint256.FromBig(amountBig) // XXX: should we check overflow?
57+
amountU256, _ := uint256.FromBig(amountBig)
5858
state.AddBalance(to, amountU256)
5959
}
6060
}

stateupgrade/state_upgrade.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func upgradeAccount(account common.Address, upgrade params.StateUpgradeAccount,
3030
}
3131

3232
if upgrade.BalanceChange != nil {
33-
balanceChange, _ := uint256.FromBig((*big.Int)(upgrade.BalanceChange)) // XXX: do we need to check overflow?
33+
balanceChange, _ := uint256.FromBig((*big.Int)(upgrade.BalanceChange))
3434
state.AddBalance(account, balanceChange)
3535
}
3636
if len(upgrade.Code) != 0 {

0 commit comments

Comments
 (0)