-
Notifications
You must be signed in to change notification settings - Fork 846
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
Liquid updates #759
Liquid updates #759
Conversation
Set correct hrps for liquid networks Add Blech32 encoder for elements segwit blinded addresses Allow alt networks to have more bech32 encoders configured than btc Added additional RPC commands for elements Update WellKnownNode versions for elements and bitcoin Add additional serialization methods to BitcoinStream Adjust altcoin tests for elements differences Add support for dynamic federation mode blocks in elements Adjust Elements regtest genesis hash
does not build |
NBitcoin.Tests/AltcoinTests.cs
Outdated
Assert.Equal(Money.Zero, rpc.GetBalance()); | ||
node.Generate(1); | ||
Assert.NotEqual(Money.Zero, rpc.GetBalance()); | ||
if (new[] {Liquid.Instance.Mainnet, Liquid.Instance.Testnet, Liquid.Instance.Regtest,}.Contains( |
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.
The GetBalanceAsync
should still pass and implies LBTC, even if it is liquid.
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.
GetBalance rpc call send a different json structure than bitcoind
@@ -12,7 +14,12 @@ class LiquidRegtest { } | |||
static Liquid() | |||
{ | |||
ElementsParams<Liquid>.PeggedAssetId = new uint256("6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d"); | |||
ElementsParams<Liquid>.SignedBlocks = true; | |||
ElementsParams<Liquid>.BlockHeightInHeader = true; |
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.
why are those? if they are always true, why even put them?
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.
depends on your custom chain config for elements.
}, | ||
RegtestFolderName = "elementsregtest", | ||
Chain = "elementsregtest", | ||
AdditionalRegtestConfig = "initialfreecoins=210000000000000\nvalidatepegin=0", | ||
UseSectionInConfigFile = true | ||
AdditionalRegtestConfig = "initialfreecoins=0\nvalidatepegin=0\n\ncon_dyna_deploy_start=99999999999999999", |
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.
why changing initialfreecoins
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.
initialfreecoins sets the default balance of bitcoin. For the tests, we want this 0
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.
Well, if we mine 101 blocks we should be able to spend something.
But I don't think liquid blocks have reward, so that's why I used freecoins.
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.
fair, let me switch and adjust
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
The CI is failing weirdly, i think it has an old C# compiler version build compiles & altcointests pass locally |
|
Weird, locally it compiles and executes. I wonder what is up with that |
Updated Liquid Support