mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-26 05:27:19 +00:00
e8501bbf43
* eth_getTransactionReceipt to return nil for transactions not in the database * Fix compile error
21 lines
511 B
Go
21 lines
511 B
Go
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)
|
|
}
|
|
api := NewEthAPI(db, nil, 5000000, nil)
|
|
// 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)
|
|
}
|
|
}
|