Permalink
Browse files

Specify ProtocolCapabilities

  • Loading branch information...
nopara73 committed Oct 17, 2018
1 parent 90199e5 commit 9ce9395075ba29d0cca6fd408f35a2b96e7383c9
@@ -183,7 +183,8 @@ public static void InitializeNoWallet()
requirements: new NodeRequirement
{
RequiredServices = NodeServices.Network,
MinVersion = Constants.ProtocolVersion_WITNESS_VERSION
MinVersion = Constants.ProtocolVersion_WITNESS_VERSION,
MinProtocolCapabilities = Constants.MinProtocolCapabilities
});
Nodes.ConnectedNodes.Add(Node.Connect(Network.RegTest, new IPEndPoint(IPAddress.Loopback, 18444)));
@@ -196,7 +197,8 @@ public static void InitializeNoWallet()
new NodeRequirement
{
RequiredServices = NodeServices.Network,
MinVersion = Constants.ProtocolVersion_WITNESS_VERSION
MinVersion = Constants.ProtocolVersion_WITNESS_VERSION,
MinProtocolCapabilities = Constants.MinProtocolCapabilities
});
RegTestMemPoolServingNode = null;
@@ -85,7 +85,8 @@ public async Task TestServicesAsync(string networkString)
new NodeRequirement
{
RequiredServices = NodeServices.Network,
MinVersion = Helpers.Constants.ProtocolVersion_WITNESS_VERSION
MinVersion = Helpers.Constants.ProtocolVersion_WITNESS_VERSION,
MinProtocolCapabilities = Helpers.Constants.MinProtocolCapabilities
});
KeyManager keyManager = KeyManager.CreateNew(out _, "password");
@@ -406,7 +406,8 @@ public async Task WalletTestsAsync()
requirements: new NodeRequirement
{
RequiredServices = NodeServices.Network,
MinVersion = Helpers.Constants.ProtocolVersion_WITNESS_VERSION
MinVersion = Helpers.Constants.ProtocolVersion_WITNESS_VERSION,
MinProtocolCapabilities = Helpers.Constants.MinProtocolCapabilities
});
nodes.ConnectedNodes.Add(RegTestFixture.BackendRegTestNode.CreateNodeClient());
@@ -641,7 +642,8 @@ private void WalletTestsAsync_MemPoolService_TransactionReceived(object sender,
requirements: new NodeRequirement
{
RequiredServices = NodeServices.Network,
MinVersion = Helpers.Constants.ProtocolVersion_WITNESS_VERSION
MinVersion = Helpers.Constants.ProtocolVersion_WITNESS_VERSION,
MinProtocolCapabilities = Helpers.Constants.MinProtocolCapabilities
});
nodes.ConnectedNodes.Add(RegTestFixture.BackendRegTestNode.CreateNodeClient());
@@ -1083,7 +1085,8 @@ public async Task BuildTransactionValidationsTestAsync()
requirements: new NodeRequirement
{
RequiredServices = NodeServices.Network,
MinVersion = Helpers.Constants.ProtocolVersion_WITNESS_VERSION
MinVersion = Helpers.Constants.ProtocolVersion_WITNESS_VERSION,
MinProtocolCapabilities = Helpers.Constants.MinProtocolCapabilities
});
nodes.ConnectedNodes.Add(RegTestFixture.BackendRegTestNode.CreateNodeClient());
@@ -1253,7 +1256,8 @@ public async Task BuildTransactionReorgsTestAsync()
requirements: new NodeRequirement
{
RequiredServices = NodeServices.Network,
MinVersion = Helpers.Constants.ProtocolVersion_WITNESS_VERSION
MinVersion = Helpers.Constants.ProtocolVersion_WITNESS_VERSION,
MinProtocolCapabilities = Helpers.Constants.MinProtocolCapabilities
});
nodes.ConnectedNodes.Add(RegTestFixture.BackendRegTestNode.CreateNodeClient());
@@ -1424,7 +1428,8 @@ public async Task SpendUnconfirmedTxTestAsync()
requirements: new NodeRequirement
{
RequiredServices = NodeServices.Network,
MinVersion = Helpers.Constants.ProtocolVersion_WITNESS_VERSION
MinVersion = Helpers.Constants.ProtocolVersion_WITNESS_VERSION,
MinProtocolCapabilities = Helpers.Constants.MinProtocolCapabilities
});
nodes.ConnectedNodes.Add(RegTestFixture.BackendRegTestNode.CreateNodeClient());
@@ -2692,15 +2697,17 @@ public async Task CoinJoinMultipleRoundTestsAsync()
requirements: new NodeRequirement
{
RequiredServices = NodeServices.Network,
MinVersion = Helpers.Constants.ProtocolVersion_WITNESS_VERSION
MinVersion = Helpers.Constants.ProtocolVersion_WITNESS_VERSION,
MinProtocolCapabilities = Helpers.Constants.MinProtocolCapabilities
});
nodes.ConnectedNodes.Add(RegTestFixture.BackendRegTestNode.CreateNodeClient());
var nodes2 = new NodesGroup(Global.Config.Network,
requirements: new NodeRequirement
{
RequiredServices = NodeServices.Network,
MinVersion = Helpers.Constants.ProtocolVersion_WITNESS_VERSION
MinVersion = Helpers.Constants.ProtocolVersion_WITNESS_VERSION,
MinProtocolCapabilities = Helpers.Constants.MinProtocolCapabilities
});
nodes2.ConnectedNodes.Add(RegTestFixture.BackendRegTestNode.CreateNodeClient());
@@ -1,4 +1,5 @@
using NBitcoin;
using NBitcoin.Protocol;
using Org.BouncyCastle.Math;
using System;
using WalletWasabi.Backend.Models.Responses;
@@ -13,6 +14,8 @@ public static class Constants
public const uint ProtocolVersion_WITNESS_VERSION = 70012;
public static readonly ProtocolCapabilities MinProtocolCapabilities = new ProtocolCapabilities() { SupportGetBlock = true, SupportWitness = true };
public const int P2wpkhInputSizeInBytes = 41;
public const int P2pkhInputSizeInBytes = 145;
public const int OutputSizeInBytes = 33;

0 comments on commit 9ce9395

Please sign in to comment.