@@ -130,28 +130,28 @@ type dbWrapper struct {
130
130
}
131
131
132
132
// getBalance retrieves an account's balance
133
- func (dw * dbWrapper ) getBalance (addr common. Address ) * big.Int {
134
- return dw .db .GetBalance (addr )
133
+ func (dw * dbWrapper ) getBalance (addr [] byte ) * big.Int {
134
+ return dw .db .GetBalance (common . BytesToAddress ( addr ) )
135
135
}
136
136
137
137
// getNonce retrieves an account's nonce
138
- func (dw * dbWrapper ) getNonce (addr common. Address ) uint64 {
139
- return dw .db .GetNonce (addr )
138
+ func (dw * dbWrapper ) getNonce (addr [] byte ) uint64 {
139
+ return dw .db .GetNonce (common . BytesToAddress ( addr ) )
140
140
}
141
141
142
142
// getCode retrieves an account's code
143
- func (dw * dbWrapper ) getCode (addr common. Address ) []byte {
144
- return dw .db .GetCode (addr )
143
+ func (dw * dbWrapper ) getCode (addr [] byte ) []byte {
144
+ return dw .db .GetCode (common . BytesToAddress ( addr ) )
145
145
}
146
146
147
147
// getState retrieves an account's state data for the given hash
148
- func (dw * dbWrapper ) getState (addr common. Address , hash common.Hash ) common.Hash {
149
- return dw .db .GetState (addr , hash )
148
+ func (dw * dbWrapper ) getState (addr [] byte , hash common.Hash ) common.Hash {
149
+ return dw .db .GetState (common . BytesToAddress ( addr ) , hash )
150
150
}
151
151
152
152
// exists returns true iff the account exists
153
- func (dw * dbWrapper ) exists (addr common. Address ) bool {
154
- return dw .db .Exist (addr )
153
+ func (dw * dbWrapper ) exists (addr [] byte ) bool {
154
+ return dw .db .Exist (common . BytesToAddress ( addr ) )
155
155
}
156
156
157
157
// toValue returns an otto.Value for the dbWrapper
0 commit comments