Skip to content

Commit faa10e7

Browse files
committed
core/state/accesswitness: cleanup comments
Signed-off-by: Ignacio Hagopian <[email protected]>
1 parent 8cba2fa commit faa10e7

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

core/state/access_witness.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ type AccessWitness struct {
4545
pointCache *utils.PointCache
4646
}
4747

48-
// TODO(jsign): consider Reset() API.
49-
5048
func NewAccessWitness(pointCache *utils.PointCache) *AccessWitness {
5149
return &AccessWitness{
5250
branches: make(map[branchAccessKey]mode),
@@ -90,11 +88,6 @@ func (aw *AccessWitness) Copy() *AccessWitness {
9088
return naw
9189
}
9290

93-
// TODO(jsign): remove
94-
func (aw *AccessWitness) GetTreeKeyVersionCached(addr []byte) []byte {
95-
return aw.pointCache.GetTreeKeyVersionCached(addr)
96-
}
97-
9891
func (aw *AccessWitness) TouchAndChargeProofOfAbsence(addr []byte) uint64 {
9992
var gas uint64
10093
gas += aw.TouchAddressOnReadAndComputeGas(addr, zeroTreeIndex, utils.VersionLeafKey)
@@ -137,7 +130,7 @@ func (aw *AccessWitness) TouchAndChargeContractCreateInit(addr []byte, createSen
137130
// the tree
138131
func (aw *AccessWitness) TouchAndChargeContractCreateCompleted(addr []byte, withValue bool) uint64 { // TODO(jsign): withValue not used?
139132
var gas uint64
140-
gas += aw.TouchAddressOnWriteAndComputeGas(addr, zeroTreeIndex, utils.VersionLeafKey) // TODO(jsign): why write?
133+
gas += aw.TouchAddressOnWriteAndComputeGas(addr, zeroTreeIndex, utils.VersionLeafKey)
141134
gas += aw.TouchAddressOnReadAndComputeGas(addr, zeroTreeIndex, utils.CodeSizeLeafKey)
142135
gas += aw.TouchAddressOnReadAndComputeGas(addr, zeroTreeIndex, utils.CodeKeccakLeafKey)
143136
gas += aw.TouchAddressOnWriteAndComputeGas(addr, zeroTreeIndex, utils.NonceLeafKey)

0 commit comments

Comments
 (0)