mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 22:26:42 +00:00
ethclient: add test for pending block retrieval
This commit is contained in:
parent
ad5d463ceb
commit
8a84834134
1 changed files with 6 additions and 0 deletions
|
|
@ -307,6 +307,12 @@ func testTransactionInBlock(t *testing.T, client *rpc.Client) {
|
|||
if tx.Hash() != testTx2.Hash() {
|
||||
t.Fatalf("unexpected transaction: %v", tx)
|
||||
}
|
||||
|
||||
// Test pending block
|
||||
_, err = ec.BlockByNumber(context.Background(), big.NewInt(int64(rpc.PendingBlockNumber)))
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func testChainID(t *testing.T, client *rpc.Client) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue