Merge pull request #924 from maticnetwork/raneet10/pos-1600

core,eth: fix TestDeduplication, TestSyncAccountPerformance, TestTrac…
This commit is contained in:
Raneet Debnath 2023-07-04 19:22:15 +05:30 committed by GitHub
commit 0a7ab3aa17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View file

@ -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)
}

View file

@ -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,

View file

@ -1193,6 +1193,8 @@ func (api *API) TraceTransaction(ctx context.Context, hash common.Hash, config *
return &ethapi.ExecutionResult{
StructLogs: make([]ethapi.StructLogRes, 0),
}, nil
} else {
return nil, errTxNotFound
}
}