Implement RPC changes in v30 - #412
Conversation
settxfee is deprecated in v30 and removed in v31. Feature gate the test to v30 and below and for v30 add the required `-deprecatedrpc=settxfee` flag. Remove TODO from the types table.
In v30 it is no longer possible to create a legacy wallet. This means that migratewallet cannot be tested using only v30. Add a comment to the types table and test.
Some return fields were removed in v30 and a new flags field was added. Update the model to make the removed fields options and add the new flags. Update all the into functions. Redefine the type, error and into function for v30. Remove the TODO from the types table. Remove the `v29_and_below` feature gate from the test.
A new `warnings` field was added in v30. Redefine the type for v30, there is no model. Remove the TODO from the types table. Remove the `v29_and_below` feature gate from the test.
|
Nice work man. This PR highlights an interesting thing about the version specific types (we really need a shorter name for those) and the model types. As the library progresses to support new versions of Core users using the model types face breakage when they upgrade but users of the version specific types (vs-types?) do not. I.e., the vs-types should be stable across releases except for bug fixes but the model types are perma-unstable. Interesting, I never thought of it like this before. |
|
One (annoying) solution is to make everything in the model an Option? |
|
Interesting idea, doesn't help with when Core adds new fields though. We could have |
There are four remaining RPCs that have changes in v30 that need to be implemented:
settxfeeis deprecated in v30 and removed in v31. Feature gate the test to v30 and below and for v30 add the required-deprecatedrpc=settxfeeflag. Remove TODO from the types table.migratewalletcannot be tested using only v30. There are no changes to the RPC in v30 so the v29 test is still valid. Add a comment to the types table and test.getwalletinfohad some return fields removed in v30 and a new flags field was added. Update the model to make the removed fields options and add the new flags. Update all the into functions. Redefine the type, error and into function for v30. Remove the TODO from the types table. Remove thev29_and_belowfeature gate from the test.listwalletdirhas a newwarningsfield was added in v30. Redefine the type for v30, there is no model. Remove the TODO from the types table. Remove thev29_and_belowfeature gate from the test.Together with #387, #388, #409 and #410 Closes #384