mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 13:07:17 +00:00
eedabfca85
* txpool_content * txpool_content * txpool_content * txpool_content * Squashed 'interfaces/' content from commit 1e916d013 git-subtree-dir: interfaces git-subtree-split: 1e916d0137aff7bd9e9356cc203cea5f0ea9c7f1 * add test * add test * add test * merge devel * save
27 lines
913 B
Go
27 lines
913 B
Go
package commands
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/ledgerwatch/erigon/common"
|
|
)
|
|
|
|
func TestGetTransactionReceipt(t *testing.T) {
|
|
db := createTestKV(t)
|
|
api := NewEthAPI(NewBaseApi(nil), db, nil, nil, nil, 5000000)
|
|
// Call GetTransactionReceipt for transaction which is not in the database
|
|
if _, err := api.GetTransactionReceipt(context.Background(), common.Hash{}); err != nil {
|
|
t.Errorf("calling GetTransactionReceipt with empty hash: %v", err)
|
|
}
|
|
}
|
|
|
|
func TestGetTransactionReceiptUnprotected(t *testing.T) {
|
|
db := createTestKV(t)
|
|
api := NewEthAPI(NewBaseApi(nil), db, nil, nil, nil, 5000000)
|
|
// Call GetTransactionReceipt for un-protected transaction
|
|
if _, err := api.GetTransactionReceipt(context.Background(), common.HexToHash("0x3f3cb8a0e13ed2481f97f53f7095b9cbc78b6ffb779f2d3e565146371a8830ea")); err != nil {
|
|
t.Errorf("calling GetTransactionReceipt for unprotected tx: %v", err)
|
|
}
|
|
}
|