Ejemplo n.º 1
0
        public static SavedOutPoint FromOutPoint(OutPoint pos)
        {
            var outPoint = new SavedOutPoint
            {
                Hash = pos.Hash.ToString(),
                N    = pos.N
            };

            return(outPoint);
        }
Ejemplo n.º 2
0
 public static SavedTxIn FromTxIn(TxIn tx)
 {
     return(new SavedTxIn
     {
         Sequence = tx.Sequence,
         ScriptSig = tx.ScriptSig.ToString(),
         WitScript = tx.WitScript.ToString(),
         IsFinal = tx.IsFinal,
         PrevOut = SavedOutPoint.FromOutPoint(tx.PrevOut)
     });
 }
Ejemplo n.º 3
0
        public static SavedPosParameters FromPosParameters(PosParameters pos)
        {
            var posParams = new SavedPosParameters
            {
                HashProof       = pos.HashProof.ToString(),
                Mint            = pos.Mint,
                Flags           = (int)pos.Flags,
                StakeModifier   = pos.StakeModifier,
                StakeModifierV2 = pos.StakeModifierV2.ToString(),
                StakeTime       = pos.StakeTime,
                PrevoutStake    = SavedOutPoint.FromOutPoint(pos.PrevoutStake)
            };

            return(posParams);
        }