Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions vms/saevm/sae/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ go_test(
"@com_github_ava_labs_libevm//libevm/options",
"@com_github_ava_labs_libevm//log",
"@com_github_ava_labs_libevm//params",
"@com_github_ava_labs_libevm//rlp",
"@com_github_ava_labs_libevm//rpc",
"@com_github_ava_labs_libevm//trie",
"@com_github_google_go_cmp//cmp",
Expand Down
1 change: 1 addition & 0 deletions vms/saevm/sae/rpc/mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func (b *backend) TxPoolContentFrom(addr common.Address) ([]*types.Transaction,
return b.Set.Pool.ContentFrom(addr)
}

// GetPoolTransactions returns only pending transactions from the mempool.
func (b *backend) GetPoolTransactions() (types.Transactions, error) {
pending := b.Pool.Pending(txpool.PendingFilter{})

Expand Down
8 changes: 3 additions & 5 deletions vms/saevm/sae/rpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,12 @@ func (b *backend) server(filter *filters.FilterAPI) (*rpc.Server, error) {
// - debug_dbAncient
// - debug_dbAncients
// - debug_dbGet
// - debug_getRawTransaction
// - debug_printBlock
// - debug_setHead (no-op, logs info)
//
// TODO: implement once BlockByNumberOrHash and GetReceipts exist:
// - debug_getRawBlock
// - debug_getRawHeader
// - debug_getRawReceipts
// - debug_getRawTransaction
// - debug_printBlock
// - debug_setHead (no-op, logs info)
"debug", ethapi.NewDebugAPI(b),
})
}
Expand Down
2 changes: 2 additions & 0 deletions vms/saevm/sae/rpc/transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ func (b *backend) GetTransaction(ctx context.Context, txHash common.Hash) (exist
return true, tx, blockHash, blockNumber, index, nil
}

// GetPoolTransaction returns a transaction from the mempool regardless of its
// status (pending or queued).
func (b *backend) GetPoolTransaction(txHash common.Hash) *types.Transaction {
return b.Set.Pool.Get(txHash)
}
Loading
Loading