Modified test plugin to enable faster execution.
This required adding a dummy injection into core/blockchain.go
This commit is contained in:
parent
18be67b3a3
commit
9d34721d46
@ -1386,6 +1386,11 @@ func (bc *BlockChain) writeKnownBlock(block *types.Block) error {
|
|||||||
// writeBlockWithState writes block, metadata and corresponding state data to the
|
// writeBlockWithState writes block, metadata and corresponding state data to the
|
||||||
// database.
|
// database.
|
||||||
func (bc *BlockChain) writeBlockWithState(block *types.Block, receipts []*types.Receipt, state *state.StateDB) error {
|
func (bc *BlockChain) writeBlockWithState(block *types.Block, receipts []*types.Receipt, state *state.StateDB) error {
|
||||||
|
//begin PluGeth injection
|
||||||
|
var interval time.Duration
|
||||||
|
_ = pluginSetTrieFlushIntervalClone(interval) // this is being called here to engage a testing scenario
|
||||||
|
//end PluGeth injection
|
||||||
|
|
||||||
// Calculate the total difficulty of the block
|
// Calculate the total difficulty of the block
|
||||||
ptd := bc.GetTd(block.ParentHash(), block.NumberU64()-1)
|
ptd := bc.GetTd(block.ParentHash(), block.NumberU64()-1)
|
||||||
if ptd == nil {
|
if ptd == nil {
|
||||||
|
@ -191,7 +191,7 @@ func txFactory() {
|
|||||||
"from": coinBase,
|
"from": coinBase,
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := 0; i < 126; i ++ {
|
for i := 0; i < 10; i ++ {
|
||||||
time.Sleep(2 * time.Second)
|
time.Sleep(2 * time.Second)
|
||||||
err = client.Call(&t3, "eth_sendTransaction", genericArg)
|
err = client.Call(&t3, "eth_sendTransaction", genericArg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -293,7 +293,5 @@ func testGetContractCode(hash core.Hash) {
|
|||||||
log.Error("Exit with error, return value from GetContractCode is divergent from control value")
|
log.Error("Exit with error, return value from GetContractCode is divergent from control value")
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Info("made it through checkGetContractCode")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ if ps -p $pid1 > /dev/null; then
|
|||||||
kill $pid1
|
kill $pid1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 255
|
sleep 25
|
||||||
|
|
||||||
if ps -p $pid0 > /dev/null; then
|
if ps -p $pid0 > /dev/null; then
|
||||||
kill $pid0
|
kill $pid0
|
||||||
|
Loading…
Reference in New Issue
Block a user