You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While implementing tests for RGB v0.12, I noticed that the current implementation doesn't support initialization of mainnet wallets.
The current API appears to only provide testnet-related functionality. I understand this might be intentional as part of a phased development approach, focusing on testnet stability before adding mainnet support.
Current Limitation
In the Mound structure, there's currently no public API to initialize a mainnet wallet. The only available constructors are:
bitcoin_testnet()
with_testnet(consensus, persistence)
open_testnet(consensus, persistence)
All of these methods set testnet: true by default, with no option to set it to false for mainnet.
Impact
This limitation affects our ability to test scenarios where assets need to be transferred between testnet and mainnet wallets. For example, in our test case mainnet_wlt_receiving_test_asset, we're trying to test sending assets from a testnet wallet to a mainnet wallet:
#[test]#[ignore = "fix needed"]fnmainnet_wlt_receiving_test_asset(){initialize();letmut wlt_1 = get_wallet(&DescriptorType::Wpkh);// FIXME: Because the latest `Mound` structure in rgb does not support setting the mainnet,// The default `Mound.testnet` is eq true, which cannot correctly initialize the mainnet wallet,// So this test case cannot be executed temporarilyletmut wlt_2 = get_mainnet_wallet();// Test implementation...}
Proposed Solution
We could submit a PR to add the necessary API for initializing mainnet wallets, which would enable us to properly test these scenarios. However, we'd like to know whether it's better to submit these PRs now or wait until the overall API becomes more stable?
The text was updated successfully, but these errors were encountered:
Description
While implementing tests for RGB v0.12, I noticed that the current implementation doesn't support initialization of mainnet wallets.
The current API appears to only provide testnet-related functionality. I understand this might be intentional as part of a phased development approach, focusing on testnet stability before adding mainnet support.
Current Limitation
In the
Mound
structure, there's currently no public API to initialize a mainnet wallet. The only available constructors are:bitcoin_testnet()
with_testnet(consensus, persistence)
open_testnet(consensus, persistence)
All of these methods set
testnet: true
by default, with no option to set it tofalse
for mainnet.Impact
This limitation affects our ability to test scenarios where assets need to be transferred between testnet and mainnet wallets. For example, in our test case
mainnet_wlt_receiving_test_asset
, we're trying to test sending assets from a testnet wallet to a mainnet wallet:Proposed Solution
We could submit a PR to add the necessary API for initializing mainnet wallets, which would enable us to properly test these scenarios. However, we'd like to know whether it's better to submit these PRs now or wait until the overall API becomes more stable?
The text was updated successfully, but these errors were encountered: