Skip to content

Commit

Permalink
review feedback for rebase over kiln (ethereum#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
gballet committed Apr 12, 2022
1 parent b9adceb commit 298d8ce
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 23 deletions.
7 changes: 1 addition & 6 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1594,12 +1594,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals, setHead bool)

// Process block using the parent state as reference point
substart := time.Now()
var (
usedGas uint64
receipts types.Receipts
logs []*types.Log
)
receipts, logs, usedGas, err = bc.processor.Process(block, statedb, bc.vmConfig)
receipts, logs, usedGas, err := bc.processor.Process(block, statedb, bc.vmConfig)
if err != nil {
bc.reportBlock(block, receipts, err)
atomic.StoreUint32(&followupInterrupt, 1)
Expand Down
15 changes: 0 additions & 15 deletions core/state/state_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -612,25 +612,10 @@ func (s *stateObject) Balance() *big.Int {
return s.data.Balance
}

func (s *stateObject) BalanceLE() []byte {
var out [32]byte
for i, b := range s.data.Balance.Bytes() {
out[len(s.data.Balance.Bytes())-1-i] = b
}

return out[:]
}

func (s *stateObject) Nonce() uint64 {
return s.data.Nonce
}

func (s *stateObject) NonceLE() []byte {
var out [32]byte
binary.LittleEndian.PutUint64(out[:8], s.data.Nonce)
return out[:]
}

// Never called, but must be present to allow stateObject to be used
// as a vm.Account interface that also satisfies the vm.ContractRef
// interface. Interfaces are awesome.
Expand Down
1 change: 0 additions & 1 deletion core/types/access_witness.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const (

// AccessWitness lists the locations of the state that are being accessed
// during the production of a block.
// TODO(@gballet) this doesn't fully support deletions
type AccessWitness struct {
// Branches flags if a given branch has been loaded
Branches map[VerkleStem]Mode
Expand Down
1 change: 0 additions & 1 deletion core/vm/interpreter.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ func (in *EVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) (
contract.Gas -= touchEachChunksOnReadAndChargeGas(pc, 1, contract.Address().Bytes()[:], contract.Code, contract, in.evm.TxContext.Accesses, contract.IsDeployment)
}

// TODO how can we tell if we are in stateless mode here and need to get the op from the witness
// If we are in witness mode, then raise an error
op = contract.GetOp(pc)

Expand Down

0 comments on commit 298d8ce

Please sign in to comment.