Skip to content

Commit

Permalink
test: minor fix rpc-response data and updateConsensusKey unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
hui-an-yang committed Nov 8, 2022
1 parent f537516 commit 757f47d
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 5 deletions.
66 changes: 62 additions & 4 deletions packages/taquito-rpc/test/data/rpc-responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4860,7 +4860,12 @@ export const blockLimanetSample = {
max_operations_ttl: 120,
max_operation_data_length: 32768,
max_block_header_length: 289,
max_operation_list_length: [[Object], [Object], [Object], [Object]],
max_operation_list_length: [
{ max_size: 4194304, max_op: 2048 },
{ max_size: 32768 },
{ max_size: 135168, max_op: 132 },
{ max_size: 524288 },
],
proposer: 'tz1PirbogVqfmBT9XCuYJ1KnDx4bnMSYfGru',
baker: 'tz1PirbogVqfmBT9XCuYJ1KnDx4bnMSYfGru',
level_info: {
Expand All @@ -4870,12 +4875,65 @@ export const blockLimanetSample = {
cycle_position: 2027,
expected_commitment: false,
},
voting_period_info: { voting_period: [Object], position: 2027, remaining: 2068 },
voting_period_info: { voting_period: { index: 5, kind: 'proposal', start_position: 102400 }, position: 2027, remaining: 2068 },
nonce_hash: null,
deactivated: [],
balance_updates: [[Object], [Object], [Object], [Object], [Object]],
balance_updates: [
{
kind: 'minted',
category: 'baking rewards',
change: '-5000000',
origin: 'block',
},
{
kind: 'contract',
contract: 'tz1MeT8NACB8Q4uV9dPQ3YxXBmYgapbxQxQ5',
change: '5000000',
origin: 'block',
},
{
kind: 'minted',
category: 'baking bonuses',
change: '-4073843',
origin: 'block',
},
{
kind: 'contract',
contract: 'tz1MeT8NACB8Q4uV9dPQ3YxXBmYgapbxQxQ5',
change: '4073843',
origin: 'block',
},
],
liquidity_baking_toggle_ema: 583905253,
implicit_operations_results: [[Object]],
implicit_operations_results: [
{
kind: 'transaction',
storage: [
{ int: '1' },
{ int: '261067500100' },
{ int: '100' },
{ bytes: '01e927f00ef734dfc85919635e9afc9166c83ef9fc00' },
{ bytes: '0115eb0104481a6d7921160bc982c5e0a561cd8a3a00' },
],
balance_updates: [
{
kind: 'minted',
category: 'subsidy',
change: '-2500000',
origin: 'subsidy',
},
{
kind: 'contract',
contract: 'KT1TxqZ8QtKvLu3V3JH7Gx58n7Co8pgtpQU5',
change: '2500000',
origin: 'subsidy',
},
],
consumed_gas: '225',
consumed_milligas: '224023',
storage_size: '4632',
},
],
proposer_consensus_key: 'tz1PirbogVqfmBT9XCuYJ1KnDx4bnMSYfGru',
baker_consensus_key: 'tz1PirbogVqfmBT9XCuYJ1KnDx4bnMSYfGru',
consumed_milligas: '1100000',
Expand Down
2 changes: 1 addition & 1 deletion packages/taquito-rpc/test/taquito-rpc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3282,7 +3282,7 @@ describe('RpcClient test', () => {
'tz1MY8g5UqVmQtpAp7qs1cUwEof1GjZCHgVv'
);
expect(content.metadata.balance_updates![0].change).toEqual('-369');
expect(content.metadata.balance_updates![1].origin).toEqual('block');
expect(content.metadata.balance_updates![0].origin).toEqual('block');

expect(content.metadata.balance_updates![1].kind).toEqual('accumulator');
expect(content.metadata.balance_updates![1].category).toEqual('block fees');
Expand Down

0 comments on commit 757f47d

Please sign in to comment.