Skip to content

Commit

Permalink
test: should contain min_fee_rate on tx_pool_info
Browse files Browse the repository at this point in the history
  • Loading branch information
shaojunda committed Mar 23, 2020
1 parent d5fad82 commit 551e7af
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 7 additions & 1 deletion spec/ckb/api_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

require 'pry'
RSpec.describe CKB::API do
Types = CKB::Types

Expand Down Expand Up @@ -188,6 +188,12 @@
expect(result).to be_a(Types::Peer)
end

it "tx pool info" do
result = api.tx_pool_info
expect(result).not_to be nil
expect(result.to_h.keys.sort).to eq %i(pending proposed orphan last_txs_updated_at min_fee_rate total_tx_cycles total_tx_size).sort
end

it "get peers" do
result = api.get_peers
expect(result).not_to be nil
Expand Down
6 changes: 6 additions & 0 deletions spec/ckb/rpc_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@
expect(result[:number].hex).to eq number
end

it "tx pool info" do
result = rpc.tx_pool_info
expect(result).not_to be nil
expect(result.keys.sort).to eq %i(pending proposed orphan last_txs_updated_at min_fee_rate total_tx_cycles total_tx_size).sort
end

context "indexer RPCs" do
it "index_lock_hash" do
result = rpc.index_lock_hash(lock_hash)
Expand Down

0 comments on commit 551e7af

Please sign in to comment.