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.writeHeadBlock(block)
|
||||||
}
|
}
|
||||||
bc.futureBlocks.Remove(block.Hash())
|
bc.futureBlocks.Remove(block.Hash())
|
||||||
|
|
||||||
|
// ptd and externTd are both PluGeth injections
|
||||||
ptd := bc.GetTd(block.ParentHash(), block.NumberU64()-1)
|
ptd := bc.GetTd(block.ParentHash(), block.NumberU64()-1)
|
||||||
if ptd == nil {
|
if ptd == nil {
|
||||||
return NonStatTy, consensus.ErrUnknownAncestor
|
return NonStatTy, consensus.ErrUnknownAncestor
|
||||||
|
@ -44,13 +44,17 @@ func newFreezerBatch(f *Freezer) *freezerBatch {
|
|||||||
|
|
||||||
// Append adds an RLP-encoded item of the given kind.
|
// Append adds an RLP-encoded item of the given kind.
|
||||||
func (batch *freezerBatch) Append(kind string, num uint64, item interface{}) error {
|
func (batch *freezerBatch) Append(kind string, num uint64, item interface{}) error {
|
||||||
|
// begin PluGeth injection
|
||||||
PluginTrackUpdate(num, kind, item)
|
PluginTrackUpdate(num, kind, item)
|
||||||
|
// end PluGeth injection
|
||||||
return batch.tables[kind].Append(num, item)
|
return batch.tables[kind].Append(num, item)
|
||||||
}
|
}
|
||||||
|
|
||||||
// AppendRaw adds an item of the given kind.
|
// AppendRaw adds an item of the given kind.
|
||||||
func (batch *freezerBatch) AppendRaw(kind string, num uint64, item []byte) error {
|
func (batch *freezerBatch) AppendRaw(kind string, num uint64, item []byte) error {
|
||||||
|
// being PluGeth injection
|
||||||
PluginTrackUpdate(num, kind, item)
|
PluginTrackUpdate(num, kind, item)
|
||||||
|
// end PluGeth injection
|
||||||
return batch.tables[kind].AppendRaw(num, item)
|
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
|
// Get the tracer from the plugin loader
|
||||||
//begin PluGeth code injection
|
//begin PluGeth code injection
|
||||||
if tr, ok := getPluginTracer(*config.Tracer); ok {
|
if tr, ok := getPluginTracer(*config.Tracer); ok {
|
||||||
//end PluGeth code injection
|
|
||||||
tracer = tr(statedb, vmctx)
|
tracer = tr(statedb, vmctx)
|
||||||
} else {
|
} else {
|
||||||
tracer, err = New(*config.Tracer, txctx, config.TracerConfig)
|
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
|
return nil, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// end PluGeth injection
|
||||||
}
|
}
|
||||||
// Define a meaningful timeout of a single transaction trace
|
// Define a meaningful timeout of a single transaction trace
|
||||||
if config.Timeout != nil {
|
if config.Timeout != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user