Docs & old code removed
This commit is contained in:
parent
faa54e59c1
commit
30fa30bd4a
@ -219,7 +219,7 @@ func (sm *BlockProcessor) ProcessWithParent(block, parent *types.Block) (td *big
|
|||||||
|
|
||||||
// Calculate the td for this block
|
// Calculate the td for this block
|
||||||
td = CalculateTD(block, parent)
|
td = CalculateTD(block, parent)
|
||||||
// Sync the current block's state to the database and cancelling out the deferred Undo
|
// Sync the current block's state to the database
|
||||||
state.Sync()
|
state.Sync()
|
||||||
// Set the block hashes for the current messages
|
// Set the block hashes for the current messages
|
||||||
state.Manifest().SetHash(block.Hash())
|
state.Manifest().SetHash(block.Hash())
|
||||||
|
@ -32,7 +32,6 @@ func GenesisBlock(db ethutil.Database) *types.Block {
|
|||||||
genesis.SetReceipts(types.Receipts{})
|
genesis.SetReceipts(types.Receipts{})
|
||||||
|
|
||||||
statedb := state.New(genesis.Root(), db)
|
statedb := state.New(genesis.Root(), db)
|
||||||
//statedb := state.New(genesis.Trie())
|
|
||||||
for _, addr := range []string{
|
for _, addr := range []string{
|
||||||
"dbdbdb2cbd23b783741e8d7fcf51e459b497e4a6",
|
"dbdbdb2cbd23b783741e8d7fcf51e459b497e4a6",
|
||||||
"e4157b34ea9615cfbde6b4fda419828124b70c78",
|
"e4157b34ea9615cfbde6b4fda419828124b70c78",
|
||||||
|
@ -186,7 +186,7 @@ func (self *StateTransition) TransitionState() (ret []byte, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
stateCopy := self.env.State().Copy()
|
//stateCopy := self.env.State().Copy()
|
||||||
vmenv := self.env
|
vmenv := self.env
|
||||||
var ref vm.ContextRef
|
var ref vm.ContextRef
|
||||||
if MessageCreatesContract(msg) {
|
if MessageCreatesContract(msg) {
|
||||||
@ -200,6 +200,7 @@ func (self *StateTransition) TransitionState() (ret []byte, err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if vmenv, ok := vmenv.(*VMEnv); ok && tryJit {
|
if vmenv, ok := vmenv.(*VMEnv); ok && tryJit {
|
||||||
statelogger.Infof("CREATE: re-running using JIT (PH=%x)\n", stateCopy.Root()[:4])
|
statelogger.Infof("CREATE: re-running using JIT (PH=%x)\n", stateCopy.Root()[:4])
|
||||||
// re-run using the JIT (validation for the JIT)
|
// re-run using the JIT (validation for the JIT)
|
||||||
@ -210,9 +211,11 @@ func (self *StateTransition) TransitionState() (ret []byte, err error) {
|
|||||||
statelogger.Infof("DONE PH=%x STD_H=%x JIT_H=%x\n", stateCopy.Root()[:4], goodState.Root()[:4], vmenv.State().Root()[:4])
|
statelogger.Infof("DONE PH=%x STD_H=%x JIT_H=%x\n", stateCopy.Root()[:4], goodState.Root()[:4], vmenv.State().Root()[:4])
|
||||||
self.state.Set(goodState)
|
self.state.Set(goodState)
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
} else {
|
} else {
|
||||||
ret, err = vmenv.Call(self.From(), self.To().Address(), self.msg.Data(), self.gas, self.gasPrice, self.value)
|
ret, err = vmenv.Call(self.From(), self.To().Address(), self.msg.Data(), self.gas, self.gasPrice, self.value)
|
||||||
|
|
||||||
|
/*
|
||||||
if vmenv, ok := vmenv.(*VMEnv); ok && tryJit {
|
if vmenv, ok := vmenv.(*VMEnv); ok && tryJit {
|
||||||
statelogger.Infof("CALL: re-running using JIT (PH=%x)\n", stateCopy.Root()[:4])
|
statelogger.Infof("CALL: re-running using JIT (PH=%x)\n", stateCopy.Root()[:4])
|
||||||
// re-run using the JIT (validation for the JIT)
|
// re-run using the JIT (validation for the JIT)
|
||||||
@ -223,6 +226,7 @@ func (self *StateTransition) TransitionState() (ret []byte, err error) {
|
|||||||
statelogger.Infof("DONE PH=%x STD_H=%x JIT_H=%x\n", stateCopy.Root()[:4], goodState.Root()[:4], vmenv.State().Root()[:4])
|
statelogger.Infof("DONE PH=%x STD_H=%x JIT_H=%x\n", stateCopy.Root()[:4], goodState.Root()[:4], vmenv.State().Root()[:4])
|
||||||
self.state.Set(goodState)
|
self.state.Set(goodState)
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -636,12 +636,12 @@ func (self *BlockPool) AddBlock(block *types.Block, peerId string) {
|
|||||||
|
|
||||||
// validate block for PoW
|
// validate block for PoW
|
||||||
if !self.verifyPoW(block) {
|
if !self.verifyPoW(block) {
|
||||||
poolLogger.Warnf("invalid pow on block [%s] by peer %s", name(hash), peerId)
|
poolLogger.Warnf("invalid pow on block [%s %v] by peer %s", name(hash), block.Number(), peerId)
|
||||||
self.peerError(peerId, ErrInvalidPoW, "%x", hash)
|
self.peerError(peerId, ErrInvalidPoW, "%x", hash)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
poolLogger.Debugf("added block [%s] sent by peer %s", name(hash), peerId)
|
poolLogger.DebugDetailf("added block [%s] sent by peer %s", name(hash), peerId)
|
||||||
node.block = block
|
node.block = block
|
||||||
node.blockBy = peerId
|
node.blockBy = peerId
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user