Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ctxc/downloader/statesync.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
"github.com/CortexFoundation/CortexTheseus/ctxcdb"
"github.com/CortexFoundation/CortexTheseus/log"
"github.com/CortexFoundation/CortexTheseus/trie"
"golang.org/x/crypto/sha3"
)

// stateReq represents a batch of state fetch requests grouped tocortexer into
Expand Down Expand Up @@ -300,7 +299,7 @@ func newStateSync(d *Downloader, root common.Hash) *stateSync {
return &stateSync{
d: d,
sched: state.NewStateSync(root, d.stateDB, d.stateBloom),
keccak: sha3.NewLegacyKeccak256().(crypto.KeccakState),
keccak: crypto.NewKeccakState(),
trieTasks: make(map[common.Hash]*trieTask),
codeTasks: make(map[common.Hash]*codeTask),
deliver: make(chan *stateReq),
Expand Down
4 changes: 1 addition & 3 deletions ctxc/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ import (
"github.com/CortexFoundation/CortexTheseus/params"
"github.com/CortexFoundation/CortexTheseus/rlp"
"github.com/CortexFoundation/CortexTheseus/trie"

"golang.org/x/crypto/sha3"
)

const (
Expand Down Expand Up @@ -990,7 +988,7 @@ func (pm *ProtocolManager) BroadcastTransactions(txs types.Transactions) {

var (
signer = types.LatestSignerForChainID(pm.blockchain.Config().ChainID) // Don't care about chain status, we just need *a* sender
hasher = sha3.NewLegacyKeccak256().(crypto.KeccakState)
hasher = crypto.NewKeccakState()
hash = make([]byte, 32)
)
for _, tx := range txs {
Expand Down
3 changes: 1 addition & 2 deletions trie/hasher.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (

"github.com/CortexFoundation/CortexTheseus/crypto"
"github.com/CortexFoundation/CortexTheseus/rlp"
"golang.org/x/crypto/sha3"
)

// hasher is a type used for the trie Hash operation. A hasher has some
Expand All @@ -38,7 +37,7 @@ var hasherPool = sync.Pool{
New: func() any {
return &hasher{
tmp: make([]byte, 0, 550), // cap is as large as a full fullNode.
sha: sha3.NewLegacyKeccak256().(crypto.KeccakState),
sha: crypto.NewKeccakState(),
encbuf: rlp.NewEncoderBuffer(nil),
}
},
Expand Down