|
|
@ -20,7 +20,6 @@ import ( |
|
|
|
"bufio" |
|
|
|
"bufio" |
|
|
|
"context" |
|
|
|
"context" |
|
|
|
"fmt" |
|
|
|
"fmt" |
|
|
|
"github.com/ethereum/go-ethereum/common/math" |
|
|
|
|
|
|
|
"io/ioutil" |
|
|
|
"io/ioutil" |
|
|
|
"os" |
|
|
|
"os" |
|
|
|
"runtime" |
|
|
|
"runtime" |
|
|
@ -29,6 +28,7 @@ import ( |
|
|
|
|
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/common" |
|
|
|
"github.com/ethereum/go-ethereum/common" |
|
|
|
"github.com/ethereum/go-ethereum/common/hexutil" |
|
|
|
"github.com/ethereum/go-ethereum/common/hexutil" |
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/common/math" |
|
|
|
"github.com/ethereum/go-ethereum/rpc" |
|
|
|
"github.com/ethereum/go-ethereum/rpc" |
|
|
|
"github.com/ethereum/go-ethereum/trie" |
|
|
|
"github.com/ethereum/go-ethereum/trie" |
|
|
|
"github.com/harmony-one/harmony/core" |
|
|
|
"github.com/harmony-one/harmony/core" |
|
|
@ -142,7 +142,7 @@ func (hmy *Harmony) TraceChain(ctx context.Context, start, end *types.Block, con |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Execute all the transactions contained within the chain concurrently for each block
|
|
|
|
// Execute all the transactions contained within the chain concurrently for each block
|
|
|
|
blocks := int(end.NumberU64()-origin) |
|
|
|
blocks := int(end.NumberU64() - origin) |
|
|
|
|
|
|
|
|
|
|
|
threads := runtime.NumCPU() |
|
|
|
threads := runtime.NumCPU() |
|
|
|
if threads > blocks { |
|
|
|
if threads > blocks { |
|
|
|