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
2 changes: 1 addition & 1 deletion execution/stagedsync/exec3_parallel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func (t *testExecTask) Sender() accounts.Address {
}

func (t *testExecTask) Hash() common.Hash {
return common.BytesToHash([]byte(fmt.Sprintf("%d", t.TxIndex)))
return common.BytesToHash(fmt.Appendf(nil, "%d", t.TxIndex))
}

func (t *testExecTask) Dependencies() []int {
Expand Down
2 changes: 1 addition & 1 deletion execution/stagedsync/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func generateBlocks2(t *testing.T, from uint64, numberOfBlocks uint64, blockWrit
}
if blockNumber == 1 || updateIncarnation || difficulty == changeCodeIndepenentlyOfIncarnations {
if newAcc.Incarnation > 0 {
code := []byte(fmt.Sprintf("acc-code-%v", blockNumber))
code := fmt.Appendf(nil, "acc-code-%v", blockNumber)
codeHashValue, _ := common.HashData(code)
codeHash := accounts.InternCodeHash(codeHashValue)
if blockNumber >= from {
Expand Down
2 changes: 1 addition & 1 deletion execution/state/versionmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var randomness = rand.Intn(10) + 10

// create test data for a given txIdx and incarnation
func valueFor(txIdx, inc int) []byte {
return []byte(fmt.Sprintf("%ver:%ver:%ver", txIdx*5, txIdx+inc, inc*5))
return fmt.Appendf(nil, "%ver:%ver:%ver", txIdx*5, txIdx+inc, inc*5)
}

func getAddress(i int) accounts.Address {
Expand Down
2 changes: 1 addition & 1 deletion execution/types/hashing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func genTransactions(n uint64) Transactions {
txs := Transactions{}

for i := uint64(0); i < n; i++ {
tx := NewTransaction(i, common.Address{}, uint256.NewInt(1000+i), 10+i, uint256.NewInt(1000+i), []byte(fmt.Sprintf("hello%d", i)))
tx := NewTransaction(i, common.Address{}, uint256.NewInt(1000+i), 10+i, uint256.NewInt(1000+i), fmt.Appendf(nil, "hello%d", i))
txs = append(txs, tx)
}

Expand Down
Loading