Skip to content

Commit

Permalink
feat(types): rename the proposals_root field in block header to propo…
Browse files Browse the repository at this point in the history
…sals_hash

@see https://github.com/nervosnetwork/ckb/pull/657/files#diff-6d476d8f86559a92f71eac6a9482b1a0R32

BREAKING CHANGE: rename the proposals_root field in block header to proposals_hash
  • Loading branch information
Keith-CY committed May 8, 2019
1 parent d6c81ad commit b2db527
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions packages/ckb-sdk-rpc/__tests__/formatters/fixtures.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
"hash": "0xe5f2d07b747f38718293987a9175764d4c03229a8a69d0bd48f7bea6c18930b1",
"number": "2",
"parent_hash": "0xa1dba96cdebaa25f2be69316c943269e23c23fcc6e90eedd94ecd88b43f77170",
"proposals_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
"proposals_hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"seal": {
"nonce": "9828930232171500901",
"proof": "0x7408000066230000942c00004735000028420000f046000059550000d56200005f640000f96a000043730000d3750000"
Expand All @@ -249,7 +249,7 @@
"hash": "0xe5f2d07b747f38718293987a9175764d4c03229a8a69d0bd48f7bea6c18930b1",
"number": "2",
"parentHash": "0xa1dba96cdebaa25f2be69316c943269e23c23fcc6e90eedd94ecd88b43f77170",
"proposalsRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"proposalsHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"seal": {
"nonce": "9828930232171500901",
"proof": "0x7408000066230000942c00004735000028420000f046000059550000d56200005f640000f96a000043730000d3750000"
Expand All @@ -272,7 +272,7 @@
"hash": "0xe5f2d07b747f38718293987a9175764d4c03229a8a69d0bd48f7bea6c18930b1",
"number": "2",
"parent_hash": "0xa1dba96cdebaa25f2be69316c943269e23c23fcc6e90eedd94ecd88b43f77170",
"proposals_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
"proposals_hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"seal": {
"nonce": "9828930232171500901",
"proof": "0x7408000066230000942c00004735000028420000f046000059550000d56200005f640000f96a000043730000d3750000"
Expand Down Expand Up @@ -318,7 +318,7 @@
"hash": "0xe5f2d07b747f38718293987a9175764d4c03229a8a69d0bd48f7bea6c18930b1",
"number": "2",
"parentHash": "0xa1dba96cdebaa25f2be69316c943269e23c23fcc6e90eedd94ecd88b43f77170",
"proposalsRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"proposalsHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"seal": {
"nonce": "9828930232171500901",
"proof": "0x7408000066230000942c00004735000028420000f046000059550000d56200005f640000f96a000043730000d3750000"
Expand Down Expand Up @@ -455,7 +455,7 @@
"hash": "0xe5f2d07b747f38718293987a9175764d4c03229a8a69d0bd48f7bea6c18930b1",
"number": "2",
"parent_hash": "0xa1dba96cdebaa25f2be69316c943269e23c23fcc6e90eedd94ecd88b43f77170",
"proposals_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
"proposals_hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"seal": {
"nonce": "9828930232171500901",
"proof": "0x7408000066230000942c00004735000028420000f046000059550000d56200005f640000f96a000043730000d3750000"
Expand All @@ -472,7 +472,7 @@
"hash": "0xe5f2d07b747f38718293987a9175764d4c03229a8a69d0bd48f7bea6c18930b1",
"number": "2",
"parentHash": "0xa1dba96cdebaa25f2be69316c943269e23c23fcc6e90eedd94ecd88b43f77170",
"proposalsRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"proposalsHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"seal": {
"nonce": "9828930232171500901",
"proof": "0x7408000066230000942c00004735000028420000f046000059550000d56200005f640000f96a000043730000d3750000"
Expand Down
4 changes: 2 additions & 2 deletions packages/ckb-sdk-rpc/src/resultFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const formatter = {
timestamp,
number,
transactions_root,
proposals_root,
proposals_hash,
witnesses_root,
difficulty,
uncles_hash,
Expand All @@ -21,7 +21,7 @@ const formatter = {
parentHash: parent_hash,
timestamp,
transactionsRoot: transactions_root,
proposalsRoot: proposals_root,
proposalsHash: proposals_hash,
witnessesRoot: witnesses_root,
difficulty,
unclesHash: uncles_hash,
Expand Down
2 changes: 1 addition & 1 deletion packages/ckb-sdk-rpc/types/CKB_RPC/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ declare module CKB_RPC {
timestamp: Timestamp
number: BlockNumber
transactions_root: Hash256
proposals_root: Hash256
proposals_hash: Hash256
witnesses_root: Hash256
difficulty: Difficulty
uncles_hash: Hash256
Expand Down
4 changes: 2 additions & 2 deletions packages/ckb-types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ declare namespace CKBComponents {
* @property timestamp
* @property number
* @property transactionsRoot
* @property proposalsRoot
* @property proposalsHash
* @property difficulty
* @property unclesHash
* @property unclesCount
Expand All @@ -145,7 +145,7 @@ declare namespace CKBComponents {
timestamp: Timestamp
number: BlockNumber
transactionsRoot: Hash256
proposalsRoot: Hash256
proposalsHash: Hash256
witnessesRoot: Hash256
difficulty: Difficulty
unclesHash: Hash256
Expand Down

0 comments on commit b2db527

Please sign in to comment.