コード例 #1
0
ファイル: disclosure.cpp プロジェクト: peer-node/flex
void DoScheduledPostDisclosureCheck(uint160 request_hash)
{
    log_ << "DoScheduledPostDisclosureCheck: " << request_hash << "\n";
    if (depositdata[request_hash]["cancelled"])
    {
        log_ << request_hash << " has been cancelled\n";
        return;
    }
    Point address = depositdata[request_hash]["address"];
    log_ << "deposit address created: " << address << "\n";
    uint160 address_hash = KeyHash(address);
    depositdata[address_hash]["address"] = address;
    log_ << "address for " << address_hash << " is " << address << "\n";
    log_ << "keyhash_ is " << FullKeyHash(address) << "\n";
    DepositAddressRequest request = msgdata[request_hash]["deposit_request"];
    string address_string;
    if (request.currency_code != FLX)
    {
        Currency currency = flexnode.currencies[request.currency_code];
        address_string = currency.crypto.PubKeyToAddress(address);
    }
    else
    {
        address_string = FlexAddressFromPubKey(address);
    }
    log_ << "final address is " << address_string << "\n";
    CBitcoinAddress address_(address_string);
    CKeyID keyid;
    address_.GetKeyID(keyid);
    vch_t keydata_(BEGIN(keyid), END(keyid));
    log_ << "keydata is " << keydata_ << "\n";
    uint160 hash(keydata_);
    log_ << "hash is " << hash << "\n";
    depositdata[hash]["address"] = address;
    CKeyID keyID(hash);
    log_ << "btc address is " << CBitcoinAddress(keyID).ToString() << "\n";
    depositdata[address_hash]["confirmed"] = true;
    depositdata[FullKeyHash(address)]["confirmed"] = true;

    if (depositdata[address].HasProperty("offset_point"))
    {
        StoreSecretAddress(address);
    }
}
コード例 #2
0
ファイル: functor_invoker_0.hpp プロジェクト: gfannes/nana
			R apply() const{ return (address_ ? address_(): R());}