mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
Merge pull request #924 from maticnetwork/raneet10/pos-1600
core,eth: fix TestDeduplication, TestSyncAccountPerformance, TestTrac…
This commit is contained in:
commit
0a7ab3aa17
3 changed files with 5 additions and 4 deletions
|
|
@ -2383,7 +2383,7 @@ func TestDeduplication(t *testing.T) {
|
|||
|
||||
errs := pool.AddRemotesSync(firsts)
|
||||
|
||||
if len(errs) != 0 {
|
||||
if len(errs) != len(firsts) {
|
||||
t.Fatalf("first add mismatching result count: have %d, want %d", len(errs), 0)
|
||||
}
|
||||
|
||||
|
|
@ -2405,7 +2405,7 @@ func TestDeduplication(t *testing.T) {
|
|||
|
||||
// Try to add all of them now and ensure previous ones error out as knowns
|
||||
errs = pool.AddRemotesSync(txs)
|
||||
if len(errs) != 0 {
|
||||
if len(errs) != len(txs) {
|
||||
t.Fatalf("all add mismatching result count: have %d, want %d", len(errs), 0)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1529,10 +1529,9 @@ func makeAccountTrieNoStorage(n int) (string, *trie.Trie, entrySlice) {
|
|||
var (
|
||||
db = trie.NewDatabase(rawdb.NewMemoryDatabase())
|
||||
accTrie = trie.NewEmpty(db)
|
||||
entries entrySlice
|
||||
)
|
||||
|
||||
entries := make(entrySlice, uint64(n))
|
||||
|
||||
for i := uint64(1); i <= uint64(n); i++ {
|
||||
value, _ := rlp.EncodeToBytes(&types.StateAccount{
|
||||
Nonce: i,
|
||||
|
|
|
|||
|
|
@ -1193,6 +1193,8 @@ func (api *API) TraceTransaction(ctx context.Context, hash common.Hash, config *
|
|||
return ðapi.ExecutionResult{
|
||||
StructLogs: make([]ethapi.StructLogRes, 0),
|
||||
}, nil
|
||||
} else {
|
||||
return nil, errTxNotFound
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue