本文整理汇总了C#中System.IO.BinaryWriter.WriteUInt256方法的典型用法代码示例。如果您正苦于以下问题:C# BinaryWriter.WriteUInt256方法的具体用法?C# BinaryWriter.WriteUInt256怎么用?C# BinaryWriter.WriteUInt256使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.IO.BinaryWriter
的用法示例。
在下文中一共展示了BinaryWriter.WriteUInt256方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EncodeBlockHeader
public static void EncodeBlockHeader(BinaryWriter writer, BlockHeader blockHeader)
{
writer.WriteUInt32(blockHeader.Version);
writer.WriteUInt256(blockHeader.PreviousBlock);
writer.WriteUInt256(blockHeader.MerkleRoot);
writer.WriteUInt32((uint)blockHeader.Time.ToUnixTimeSeconds());
writer.WriteUInt32(blockHeader.Bits);
writer.WriteUInt32(blockHeader.Nonce);
}
示例2: EncodeGetBlocksPayload
public static void EncodeGetBlocksPayload(BinaryWriter writer, GetBlocksPayload getBlocksPayload)
{
writer.WriteUInt32(getBlocksPayload.Version);
writer.WriteList(getBlocksPayload.BlockLocatorHashes, locatorHash => writer.WriteUInt256(locatorHash));
writer.WriteUInt256(getBlocksPayload.HashStop);
}
示例3: EncodeInventoryVector
public static void EncodeInventoryVector(BinaryWriter writer, InventoryVector invVector)
{
writer.WriteUInt32(invVector.Type);
writer.WriteUInt256(invVector.Hash);
}
示例4: EncodeTxOutputKey
public static void EncodeTxOutputKey(BinaryWriter writer, TxOutputKey txOutputKey)
{
writer.WriteUInt256(txOutputKey.TxHash);
writer.WriteUInt32(txOutputKey.TxOutputIndex);
}
示例5: EncodeBlockTxNode
public static void EncodeBlockTxNode(BinaryWriter writer, BlockTxNode blockTx)
{
writer.WriteInt32(blockTx.Index);
writer.WriteInt32(blockTx.Depth);
writer.WriteUInt256(blockTx.Hash);
writer.WriteBool(blockTx.Pruned);
if (!blockTx.Pruned)
writer.WriteBytes(blockTx.TxBytes.ToArray());
}
示例6: EncodeTxLookupKey
public static void EncodeTxLookupKey(BinaryWriter writer, TxLookupKey txLookupKey)
{
writer.WriteUInt256(txLookupKey.BlockHash);
writer.WriteInt32(txLookupKey.TxIndex);
}
示例7: EncodeUnmintedTx
public static void EncodeUnmintedTx(BinaryWriter writer, UnmintedTx unmintedTx)
{
writer.WriteUInt256(unmintedTx.TxHash);
EncodePrevTxOutputList(writer, unmintedTx.PrevTxOutputs);
}
示例8: EncodeUnspentTx
public static void EncodeUnspentTx(BinaryWriter writer, UnspentTx unspentTx)
{
writer.WriteUInt256(unspentTx.TxHash);
writer.WriteInt32(unspentTx.BlockIndex);
writer.WriteInt32(unspentTx.TxIndex);
writer.WriteUInt32(unspentTx.TxVersion);
writer.WriteBool(unspentTx.IsCoinbase);
writer.WriteVarBytes(unspentTx.OutputStates.ToByteArray());
writer.WriteInt32(unspentTx.OutputStates.Length);
}
示例9: EncodeSpentTx
public static void EncodeSpentTx(BinaryWriter writer, SpentTx spentTx)
{
writer.WriteUInt256(spentTx.TxHash);
writer.WriteInt32(spentTx.ConfirmedBlockIndex);
writer.WriteInt32(spentTx.TxIndex);
writer.WriteInt32(spentTx.OutputCount);
}
示例10: EncodeUInt256
public static void EncodeUInt256(BinaryWriter writer, UInt256 value)
{
writer.WriteUInt256(value);
}
示例11: EncodeTxInput
public static void EncodeTxInput(BinaryWriter writer, TxInput txInput)
{
writer.WriteUInt256(txInput.PrevTxOutputKey.TxHash);
writer.WriteUInt32(txInput.PrevTxOutputKey.TxOutputIndex);
writer.WriteVarBytes(txInput.ScriptSignature.ToArray());
writer.WriteUInt32(txInput.Sequence);
}
示例12: EncodeChainedHeader
public static void EncodeChainedHeader(BinaryWriter writer, ChainedHeader chainedHeader)
{
writer.WriteUInt256(chainedHeader.Hash);
EncodeBlockHeader(writer, chainedHeader.BlockHeader);
writer.WriteInt32(chainedHeader.Height);
writer.WriteVarBytes(chainedHeader.TotalWork.ToByteArray());
writer.WriteInt64(chainedHeader.DateSeen.UtcTicks);
}
示例13: EncodeUnmintedTx
public static void EncodeUnmintedTx(BinaryWriter writer, UnmintedTx unmintedTx)
{
writer.WriteUInt256(unmintedTx.TxHash);
writer.WriteList(unmintedTx.PrevOutputTxKeys, x => EncodeTxLookupKey(writer, x));
}
示例14: EncodeBlockTx
public static void EncodeBlockTx(BinaryWriter writer, BlockTx blockTx)
{
var txBytes = blockTx.Transaction != null ? EncodeTransaction(blockTx.Transaction) : new byte[0];
writer.WriteInt32(blockTx.Index);
writer.WriteInt32(blockTx.Depth);
writer.WriteUInt256(blockTx.Hash);
writer.WriteBool(blockTx.Pruned);
if (!blockTx.Pruned)
EncodeTransaction(writer, blockTx.Transaction);
}