Ejemplo n.º 1
0
        public MultiSignViewModel MultiSignUTXOPool2VM(bool bCommited)
        {
            LogHelper.WriteMethodLog(true);
            Dictionary <UTXO, Output> dicMsUTXOPool = new Dictionary <UTXO, Output>();

            if (bCommited)
            {
                dicMsUTXOPool = this.dicComitMsUTXOPool;
            }
            else
            {
                dicMsUTXOPool = this.dicUnComitMsUTXOPool;
            }

            MultiSignViewModel msVM = new MultiSignViewModel();

            foreach (var item in dicMsUTXOPool)
            {
                MultiSignModel msSM = new MultiSignModel();

                msSM.TxHash          = item.Key.getTxHash();
                msSM.OutputIndex     = (int)item.Key.getIndex();
                msSM.Value           = item.Value.value;
                msSM.OutScriptPKHash = item.Value.getPKHashFromScript();
                msSM.ID           = Cryptor.SHA256(msSM.OutScriptPKHash, msSM.OutScriptPKHash.Length).Substring(0, 8);
                msSM.BIsAdd2PriTx = false;
                msVM.AddItem(msSM);
            }
            LogHelper.WriteMethodLog(false);
            return(msVM);
        }
Ejemplo n.º 2
0
 public void AddItem(MultiSignModel msSM)
 {
     this.MultiSignShows.Add(msSM);
 }