mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
don't log a message when an rpc error code is ignored due to being from pruned history
This commit is contained in:
parent
bcd5a64382
commit
04ca215ddd
2 changed files with 2 additions and 14 deletions
|
|
@ -110,9 +110,7 @@ func (s *filterTestSuite) filterFullRange(t *utesting.T) {
|
|||
func (s *filterTestSuite) queryAndCheck(t *utesting.T, query *filterQuery) {
|
||||
query.run(s.cfg.client)
|
||||
if query.Err != nil {
|
||||
if errIsPrunedHistory(query.Err) {
|
||||
t.Logf("test case accessed pruned history")
|
||||
} else {
|
||||
if !errIsPrunedHistory(query.Err) {
|
||||
t.Errorf("Filter query failed (fromBlock: %d toBlock: %d addresses: %v topics: %v error: %v)", query.FromBlock, query.ToBlock, query.Address, query.Topics, query.Err)
|
||||
}
|
||||
return
|
||||
|
|
@ -131,9 +129,7 @@ func (s *filterTestSuite) fullRangeQueryAndCheck(t *utesting.T, query *filterQue
|
|||
}
|
||||
frQuery.run(s.cfg.client)
|
||||
if frQuery.Err != nil {
|
||||
if errIsPrunedHistory(frQuery.Err) {
|
||||
t.Logf("test case accessed pruned history")
|
||||
} else {
|
||||
if !errIsPrunedHistory(frQuery.Err) {
|
||||
t.Errorf("Full range filter query failed (addresses: %v topics: %v error: %v)", frQuery.Address, frQuery.Topics, frQuery.Err)
|
||||
}
|
||||
return
|
||||
|
|
|
|||
|
|
@ -122,7 +122,6 @@ func (s *historyTestSuite) testGetBlockByHash(t *utesting.T) {
|
|||
b, err := s.cfg.client.getBlockByHash(ctx, bhash, false)
|
||||
if err != nil {
|
||||
if errIsPrunedHistory(err) {
|
||||
t.Logf("test case accessed pruned history")
|
||||
continue
|
||||
}
|
||||
t.Fatalf("block %d (hash %v): error %v", num, bhash, err)
|
||||
|
|
@ -145,7 +144,6 @@ func (s *historyTestSuite) testGetBlockByNumber(t *utesting.T) {
|
|||
b, err := s.cfg.client.getBlockByNumber(ctx, num, false)
|
||||
if err != nil {
|
||||
if errIsPrunedHistory(err) {
|
||||
t.Logf("test case accessed pruned history")
|
||||
continue
|
||||
}
|
||||
t.Fatalf("block %d (hash %v): error %v", num, bhash, err)
|
||||
|
|
@ -168,7 +166,6 @@ func (s *historyTestSuite) testGetBlockTransactionCountByHash(t *utesting.T) {
|
|||
count, err := s.cfg.client.getBlockTransactionCountByHash(ctx, bhash)
|
||||
if err != nil {
|
||||
if errIsPrunedHistory(err) {
|
||||
t.Logf("test case accessed pruned history")
|
||||
continue
|
||||
}
|
||||
t.Fatalf("block %d (hash %v): error %v", num, bhash, err)
|
||||
|
|
@ -188,7 +185,6 @@ func (s *historyTestSuite) testGetBlockTransactionCountByNumber(t *utesting.T) {
|
|||
count, err := s.cfg.client.getBlockTransactionCountByNumber(ctx, num)
|
||||
if err != nil {
|
||||
if errIsPrunedHistory(err) {
|
||||
t.Logf("test case accessed pruned history")
|
||||
continue
|
||||
}
|
||||
t.Fatalf("block %d (hash %v): error %v", num, bhash, err)
|
||||
|
|
@ -208,7 +204,6 @@ func (s *historyTestSuite) testGetBlockReceiptsByHash(t *utesting.T) {
|
|||
receipts, err := s.cfg.client.getBlockReceipts(ctx, bhash)
|
||||
if err != nil {
|
||||
if errIsPrunedHistory(err) {
|
||||
t.Logf("test case accessed pruned history")
|
||||
continue
|
||||
}
|
||||
t.Fatalf("block %d (hash %v): error %v", num, bhash, err)
|
||||
|
|
@ -229,7 +224,6 @@ func (s *historyTestSuite) testGetBlockReceiptsByNumber(t *utesting.T) {
|
|||
receipts, err := s.cfg.client.getBlockReceipts(ctx, hexutil.Uint64(num))
|
||||
if err != nil {
|
||||
if errIsPrunedHistory(err) {
|
||||
t.Logf("test case accessed pruned history")
|
||||
continue
|
||||
}
|
||||
t.Fatalf("block %d (hash %v): error %v", num, bhash, err)
|
||||
|
|
@ -256,7 +250,6 @@ func (s *historyTestSuite) testGetTransactionByBlockHashAndIndex(t *utesting.T)
|
|||
tx, err := s.cfg.client.getTransactionByBlockHashAndIndex(ctx, bhash, uint64(txIndex))
|
||||
if err != nil {
|
||||
if errIsPrunedHistory(err) {
|
||||
t.Logf("test case accessed pruned history")
|
||||
continue
|
||||
}
|
||||
t.Fatalf("block %d (hash %v): error %v", num, bhash, err)
|
||||
|
|
@ -285,7 +278,6 @@ func (s *historyTestSuite) testGetTransactionByBlockNumberAndIndex(t *utesting.T
|
|||
tx, err := s.cfg.client.getTransactionByBlockNumberAndIndex(ctx, num, uint64(txIndex))
|
||||
if err != nil {
|
||||
if errIsPrunedHistory(err) {
|
||||
t.Logf("test case accessed pruned history")
|
||||
continue
|
||||
}
|
||||
t.Fatalf("block %d (hash %v): error %v", num, bhash, err)
|
||||
|
|
|
|||
Loading…
Reference in a new issue