From 488685903ec3bcfeaa4028a8b162a3bec63adab2 Mon Sep 17 00:00:00 2001 From: Francois de la Rouviere Date: Tue, 2 Feb 2021 13:27:51 +0000 Subject: [PATCH] Add mainnet check points (#400) * Add MainNet check points * Fix Tests --- src/NBitcoin.Tests/NetworkTests.cs | 2 +- src/Stratis.Bitcoin.Networks/StraxMain.cs | 3 ++- src/Stratis.Bitcoin.Tests/Consensus/CheckpointsTest.cs | 2 +- src/Stratis.Sidechains.Networks/CirrusMain.cs | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/NBitcoin.Tests/NetworkTests.cs b/src/NBitcoin.Tests/NetworkTests.cs index df855af5b2..5d748f26ce 100644 --- a/src/NBitcoin.Tests/NetworkTests.cs +++ b/src/NBitcoin.Tests/NetworkTests.cs @@ -324,7 +324,7 @@ public void StraxMainIsInitializedCorrectly() { Network network = this.straxMain; - Assert.Equal(14, network.Checkpoints.Count); + Assert.Equal(15, network.Checkpoints.Count); Assert.Equal(2, network.DNSSeeds.Count); Assert.Empty(network.SeedNodes); diff --git a/src/Stratis.Bitcoin.Networks/StraxMain.cs b/src/Stratis.Bitcoin.Networks/StraxMain.cs index afe98c7f1c..e9e9b8d71d 100644 --- a/src/Stratis.Bitcoin.Networks/StraxMain.cs +++ b/src/Stratis.Bitcoin.Networks/StraxMain.cs @@ -160,7 +160,8 @@ public StraxMain() { 30000, new CheckpointInfo(new uint256("0x4d0f2a809ef915721ced21f5ec51b6177b684eee06cadd49bcedc57daa243b8b"), new uint256("0xd9b7f8c92f289d66cb35a517e0b5c11c3e7e23a6507ce8ba2f042642849dcba0")) }, { 40000, new CheckpointInfo(new uint256("0xdc10671e67350eda9518b220e329ca9f661cd98c0e12d246471f8ec4f8a81c71"), new uint256("0xeb13622df7b0fc95068c0146d718bb2eaf2fd8943b3bea89396d8d58f5af8c15")) }, { 50000, new CheckpointInfo(new uint256("0xe3398765bc0da5b481a5dfe60f0acf14f4b1fc8582bab8f7a166317aea9aa026"), new uint256("0x350db25ca3ff01ec589681c94c325f619e5013bdc06efcbefa981776f4dcca4f")) }, - { 60000, new CheckpointInfo(new uint256("0x9cbc20fd1720529c59073ade6f5511ab5c2cf168556c9a10cb41ff9d8dac724f"), new uint256("0xe363394313d2e1af248a1c0d18b79e6074a08884dddbebfca90e8ae716edb645")) } + { 60000, new CheckpointInfo(new uint256("0x9cbc20fd1720529c59073ade6f5511ab5c2cf168556c9a10cb41ff9d8dac724f"), new uint256("0xe363394313d2e1af248a1c0d18b79e6074a08884dddbebfca90e8ae716edb645")) }, + { 150000, new CheckpointInfo(new uint256("0x48bb4c2f08088da9990e23f19cb4b9a094bdf7791f86f77a98d08e5d2b06c1ce"), new uint256("0x14f80d627e7727f4da4a5945ddb77e2821369246c72f1c6ca754c6509a4eef60")) } }; this.Bech32Encoders = new Bech32Encoder[2]; diff --git a/src/Stratis.Bitcoin.Tests/Consensus/CheckpointsTest.cs b/src/Stratis.Bitcoin.Tests/Consensus/CheckpointsTest.cs index 10e61038ad..12e71a04ac 100644 --- a/src/Stratis.Bitcoin.Tests/Consensus/CheckpointsTest.cs +++ b/src/Stratis.Bitcoin.Tests/Consensus/CheckpointsTest.cs @@ -74,7 +74,7 @@ public void GetLastCheckPointHeight_StraxMainnet_ReturnsLastCheckPointHeight() int result = checkpoints.GetLastCheckpointHeight(); - Assert.Equal(60000, result); + Assert.Equal(150000, result); } [Fact] diff --git a/src/Stratis.Sidechains.Networks/CirrusMain.cs b/src/Stratis.Sidechains.Networks/CirrusMain.cs index a807f0bd29..d37603dfea 100644 --- a/src/Stratis.Sidechains.Networks/CirrusMain.cs +++ b/src/Stratis.Sidechains.Networks/CirrusMain.cs @@ -266,7 +266,8 @@ public CirrusMain() { 1200000, new CheckpointInfo(new uint256("0x8411b830270cc9d6c2e28de1c2e8025c57a5673835f63e30708967adfee5a92c")) }, { 1300000, new CheckpointInfo(new uint256("0x512c19a8245316b4d3b13513c7901f41842846f539f668ca4ac349daaab6dc20")) }, { 1400000, new CheckpointInfo(new uint256("0xbfd4a96a6c5250f18bf7c586761256fa5f8753ffa10b24160f0648a452823a95")) }, - { 1500000, new CheckpointInfo(new uint256("0x2a1602877a5231997654bae975223762ee636be2f371cb444b2d3fb564e6989e")) } + { 1500000, new CheckpointInfo(new uint256("0x2a1602877a5231997654bae975223762ee636be2f371cb444b2d3fb564e6989e")) }, + { 1750000, new CheckpointInfo(new uint256("0x58c96a878efeeffea1b1924b61eed627687900e01588ffaa2f4a161973f01abf")) } }; this.DNSSeeds = new List