2021-02-21 08:38:00 +00:00
|
|
|
package commands
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/ledgerwatch/turbo-geth/common"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestGetTransactionReceipt(t *testing.T) {
|
|
|
|
db, err := createTestDb()
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("create test db: %v", err)
|
|
|
|
}
|
2021-03-30 07:09:00 +00:00
|
|
|
api := NewEthAPI(db, nil, 5000000, nil, nil)
|
2021-02-21 08:38:00 +00:00
|
|
|
// 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)
|
|
|
|
}
|
|
|
|
}
|