public override List <byte[]> GetProperties() { var list = new List <byte[]> { TemporaryChannelId, DustLimitSatoshis.GetBytesBigEndian(), MaxHtlcValueInFlightMSat.GetBytesBigEndian(), ChannelReserveSatoshis.GetBytesBigEndian(), HtlcMinimumMSat.GetBytesBigEndian(), MinimumDepth.GetBytesBigEndian(), ToSelfDelay.GetBytesBigEndian(), MaxAcceptedHtlcs.GetBytesBigEndian(), FundingPubKey.PublicKeyCompressed, RevocationBasepoint.PublicKeyCompressed, PaymentBasepoint.PublicKeyCompressed, DelayedPaymentBasepoint.PublicKeyCompressed, HtlcBasepoint.PublicKeyCompressed, FirstPerCommitmentPoint.PublicKeyCompressed }; if (ShutdownScriptPubKey != null) { list.Add(ShutdownScriptPubKey); } return(list); }
public void TestGetMinDepthofBinaryTree() { var root = TreeNode.BuildBSTFromArray(new int[] { 3, 1, 2, 4, 5, 6, 7, 8, 20, 11, 12, 13, 14, 15 }); var r = MinimumDepth.GetDepth(root); Assert.AreEqual(r, 3); root = TreeNode.BuildBSTFromArray(new int[] { 1, 2 }); r = MinimumDepth.GetDepth(root); Assert.AreEqual(r, 2); }