public ITransfersSubscription getSubscription(AccountPublicAddress acc)
        {
            var it = m_subscriptions.find(acc.spendPublicKey);

//C++ TO C# CONVERTER TODO TASK: Iterators are only converted within the context of 'while' and 'for' loops:
            return(it == m_subscriptions.end() ? null : it.second.get());
        }
 // returns true if no subscribers left
 public bool removeSubscription(AccountPublicAddress address)
 {
     m_subscriptions.Remove(address.spendPublicKey);
     m_spendKeys.erase(address.spendPublicKey);
     updateSyncStart();
     return(m_subscriptions.Count == 0);
 }
Beispiel #3
0
        public TransactionDestinationEntry(ulong amount, AccountPublicAddress addr)
        {
//C++ TO C# CONVERTER TODO TASK: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created:
//ORIGINAL LINE: this.amount = amount;
            this.amount.CopyFrom(amount);
//C++ TO C# CONVERTER TODO TASK: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created:
//ORIGINAL LINE: this.addr = addr;
            this.addr.CopyFrom(addr);
        }
Beispiel #4
0
        public void addPublicKeysSeen(AccountPublicAddress acc, Crypto.Hash transactionHash, Crypto.PublicKey outputKey)
        {
            var it = m_consumers.find(acc.viewPublicKey);

//C++ TO C# CONVERTER TODO TASK: Iterators are only converted within the context of 'while' and 'for' loops:
            if (it != m_consumers.end())
            {
//C++ TO C# CONVERTER TODO TASK: Iterators are only converted within the context of 'while' and 'for' loops:
                it.second.addPublicKeysSeen(transactionHash, outputKey);
            }
        }
Beispiel #5
0
        public override uint addOutput(ulong amount, AccountPublicAddress to)
        {
            checkIfSigning();

            KeyOutput outKey = new KeyOutput();

            GlobalMembers.derivePublicKey(to, txSecretKey(), transaction.outputs.Count, outKey.key);
            TransactionOutput @out = new TransactionOutput(amount, outKey);

            transaction.outputs.emplace_back(@out);
            invalidateHash();

            return(transaction.outputs.Count - 1);
        }
Beispiel #6
0
        public override bool removeSubscription(AccountPublicAddress acc)
        {
            var it = m_consumers.find(acc.viewPublicKey);

            if (it == m_consumers.end())
            {
                return(false);
            }

//C++ TO C# CONVERTER TODO TASK: Iterators are only converted within the context of 'while' and 'for' loops:
            if (it.second.removeSubscription(acc))
            {
//C++ TO C# CONVERTER TODO TASK: Iterators are only converted within the context of 'while' and 'for' loops:
                m_sync.removeConsumer(it.second.get());
                m_consumers.Remove(it);

                m_subscribers.Remove(acc.viewPublicKey);
            }

            return(true);
        }
//C++ TO C# CONVERTER WARNING: 'const' methods are not available in C#:
//ORIGINAL LINE: virtual bool findOutputsToAccount(const AccountPublicAddress& addr, const SecretKey& viewSecretKey, ClassicVector<uint>& outs, ulong& outputAmount) const override
        public override bool FindOutputsToAccount(AccountPublicAddress addr, SecretKey viewSecretKey, List <uint> outs, ulong outputAmount)
        {
            return(global::CryptoNote.findOutputsToAccount(m_txPrefix, addr, viewSecretKey, outs, outputAmount));
        }
Beispiel #8
0
 public abstract bool GetBlockTemplate(BlockTemplate b, AccountPublicAddress adr, BinaryArray extraNonce, ref ulong difficulty, ref uint height);
Beispiel #9
0
        public AccountPublicAddress addr = new AccountPublicAddress(); //destination address

        public TransactionDestinationEntry()
        {
            this.amount = 0;
            this.addr   = boost::value_initialized <AccountPublicAddress>();
        }
Beispiel #10
0
//C++ TO C# CONVERTER WARNING: 'const' methods are not available in C#:
//ORIGINAL LINE: virtual bool findOutputsToAccount(const AccountPublicAddress& addr, const SecretKey& viewSecretKey, ClassicVector<uint>& out, ulong& amount) const override
        public override bool findOutputsToAccount(AccountPublicAddress addr, SecretKey viewSecretKey, List <uint> @out, ulong amount)
        {
            return(global::CryptoNote.findOutputsToAccount(transaction, addr, viewSecretKey, @out, amount));
        }
Beispiel #11
0
 public abstract uint AddOutput(ulong amount, AccountPublicAddress to);
Beispiel #12
0
 public abstract bool FindOutputsToAccount(AccountPublicAddress addr, Crypto.SecretKey viewSecretKey, List <uint> outs, ulong outputAmount);