Merge pull request #66 from openrelayxyz/bugfix/add-missing-injection-notation
Aleterations and additions to plugeth injection comments.
This commit is contained in:
commit
94d0740fd0
@ -1367,7 +1367,8 @@ func (bc *BlockChain) writeBlockAndSetHead(block *types.Block, receipts []*types
|
||||
bc.writeHeadBlock(block)
|
||||
}
|
||||
bc.futureBlocks.Remove(block.Hash())
|
||||
|
||||
|
||||
// ptd and externTd are both PluGeth injections
|
||||
ptd := bc.GetTd(block.ParentHash(), block.NumberU64()-1)
|
||||
if ptd == nil {
|
||||
return NonStatTy, consensus.ErrUnknownAncestor
|
||||
|
@ -44,13 +44,17 @@ func newFreezerBatch(f *Freezer) *freezerBatch {
|
||||
|
||||
// Append adds an RLP-encoded item of the given kind.
|
||||
func (batch *freezerBatch) Append(kind string, num uint64, item interface{}) error {
|
||||
// begin PluGeth injection
|
||||
PluginTrackUpdate(num, kind, item)
|
||||
// end PluGeth injection
|
||||
return batch.tables[kind].Append(num, item)
|
||||
}
|
||||
|
||||
// AppendRaw adds an item of the given kind.
|
||||
func (batch *freezerBatch) AppendRaw(kind string, num uint64, item []byte) error {
|
||||
// being PluGeth injection
|
||||
PluginTrackUpdate(num, kind, item)
|
||||
// end PluGeth injection
|
||||
return batch.tables[kind].AppendRaw(num, item)
|
||||
}
|
||||
|
||||
|
@ -886,7 +886,6 @@ func (api *API) traceTx(ctx context.Context, message core.Message, txctx *Contex
|
||||
// Get the tracer from the plugin loader
|
||||
//begin PluGeth code injection
|
||||
if tr, ok := getPluginTracer(*config.Tracer); ok {
|
||||
//end PluGeth code injection
|
||||
tracer = tr(statedb, vmctx)
|
||||
} else {
|
||||
tracer, err = New(*config.Tracer, txctx, config.TracerConfig)
|
||||
@ -894,6 +893,7 @@ func (api *API) traceTx(ctx context.Context, message core.Message, txctx *Contex
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
// end PluGeth injection
|
||||
}
|
||||
// Define a meaningful timeout of a single transaction trace
|
||||
if config.Timeout != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user