Aleterations and additions to plugeth injection comments.

This commit is contained in:
philip-morlier 2023-01-27 10:03:01 -08:00
parent 27dce1a2a2
commit 294066e632
3 changed files with 7 additions and 2 deletions

View File

@ -1368,6 +1368,7 @@ func (bc *BlockChain) writeBlockAndSetHead(block *types.Block, receipts []*types
}
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

View File

@ -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)
}

View File

@ -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 {