-
Notifications
You must be signed in to change notification settings - Fork 40
Address all TODO in v26 #314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
26bf5a0 to
8a78259
Compare
types/src/model/blockchain.rs
Outdated
| /// nBits: compact representation of the block difficulty target. | ||
| pub bits: Option<String>, // v29 and later only. | ||
| /// The difficulty target. | ||
| pub target: Option<String>, // v29 and later only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| pub target: Option<String>, // v29 and later only. | |
| pub target: Option<Target>, // v29 and later only. |
In 91a0e2f
Grep for 'target: ' to see other instances of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
types/src/model/blockchain.rs
Outdated
| /// Blockhash of the tip. | ||
| pub best_block_hash: BlockHash, | ||
| /// nBits: compact representation of the block difficulty target. | ||
| pub bits: Option<String>, // v29 and later only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| pub bits: Option<String>, // v29 and later only. | |
| pub bits: Option<CompactTarget>, // v29 and later only. |
In 91a0e2f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
types/src/v27/mining.rs
Outdated
| @@ -0,0 +1,58 @@ | |||
| // SPDX-License-Identifier: CC0-1.0 | |||
|
|
|||
| //! The JSON-RPC API for Bitcoin Core `v0.17` - mining. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cut'n pasta error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
reviewed 8a78259 |
8a78259 to
933ae97
Compare
|
Suggested changes made. |
tcharding
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 933ae97
|
ooph sorry mate, needs rebase because I merged #310 |
In preparation for adding new blockchain RPCs move the module to a subdirectory and split out `error` and `into` into modules. Code move only, no functional changes.
Add the struct, model, error, into_model fn and test. Update verify to new_modelled since it has a model. Add the reexports and update the types table.
Add the struct, model, error and into_model fn. Update verify to new_modelled since it has a model. Add the reexports and update the types table. Loading the txoutset is not possible with the current node setup and it has been left untested.
Add the struct, model, error, into_model fn and test. Add the reexports and update the types table.
importmempool returns an empty json object. Create a client macro and test for it. Update the types table and verify to returns nothing.
getprioritisedtransactions adds an extra return field in v27. Redefine the struct in v27. Update the model to use the new field and also make `fee_delta` an `Amount`.
Add the `getaddrmaninfo` struct, macro and test. Update the reexports. There is no required model. Update the types table to `version` only.
Reordering of the reexports alphabetically only. No functional changes.
933ae97 to
cb12454
Compare
|
Rebased |
tcharding
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK cb12454
cb124545070cfdcdd2fd8534aecb970c924e471c Run the formatter (Jamil Lambert, PhD)
37b08219ff771e2110c9832b1196b1012adb7854 Add getaddrmaninfo struct and test (Jamil Lambert, PhD)
9ee00e0884e7cd6ab9c38abb390c4679aeff56cf Redefine getprioritisedtransactions (Jamil Lambert, PhD)
e163f934be9cedda600c6f9f18715109808e2651 Implement importmempool method and test (Jamil Lambert, PhD)
90df558a57412e19f800cee1408be4cd519c5d27 Add getchainstates method, model and test (Jamil Lambert, PhD)
0d7f6cea380e2bb697c4b123309cacbc8d2e2c39 Add loadtxoutset method and model (Jamil Lambert, PhD)
6f5145d043c31179b905a2c6e38904c5f5e522d5 Add dumptxoutset method, model and test (Jamil Lambert, PhD)
c891dc957f9def8c6f58800749543ffeaebfa39b Move v26 blockchain to subdirectory (Jamil Lambert, PhD)
Pull request description:
Go through all the TODO in the v26 types table. Add all the missing RPCs.
- Move the blockchain module to a subdirectory with separate `into.rs` and `error.rs` files in preparation for adding the new RPCs. Code move only.
- Add `dumptxoutset` method, model and test. An extra required (help says optional) argument was added in v29, update the client macro and test.
- Add `loadtxoutset` method and model. It was not possible to test this, opened Issue #313.
- Add `getchainstates` method, model and test. Extra return fields added in v29, redefine the struct and into_model fn.
- Implement `importmempool` method and test. Returns an empty json object, add the client macro and test.
- Redefine getprioritisedtransactions. Add the extra return field in v27. Also change the model so that the `fee_delta` is an `Amount`.
- Add getaddrmaninfo struct and test. Was marked as having a model, but nothing to model. Update the types table.
- Run the formatter.
ACKs for top commit:
tcharding:
ACK cb124545070cfdcdd2fd8534aecb970c924e471c
Tree-SHA512: 2d8b98329cb629552c7747c503a9ec494a4011867782c96ab01bd1e6dd2c53b55da0d37b978ebf7a07e184e8c0dd455c02119545be83270ae1cbc56b514f6eb7
Go through all the TODO in the v26 types table. Add all the missing RPCs.
into.rsanderror.rsfiles in preparation for adding the new RPCs. Code move only.dumptxoutsetmethod, model and test. An extra required (help says optional) argument was added in v29, update the client macro and test.loadtxoutsetmethod and model. It was not possible to test this, opened Issue How to testloadtxoutset? #313.getchainstatesmethod, model and test. Extra return fields added in v29, redefine the struct and into_model fn.importmempoolmethod and test. Returns an empty json object, add the client macro and test.fee_deltais anAmount.