本文整理汇总了C++中transaction::pointer::get_payment_amount方法的典型用法代码示例。如果您正苦于以下问题:C++ pointer::get_payment_amount方法的具体用法?C++ pointer::get_payment_amount怎么用?C++ pointer::get_payment_amount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类transaction::pointer
的用法示例。
在下文中一共展示了pointer::get_payment_amount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: find_transaction_history
void find_transaction_history (){
uint256 hash;
char hash_ch[32];
for (int i = 0; i < 32; ++i) hash_ch[i] = i;
hash_ch[0] = 1; hash_ch[1] = 2;
hash.init (hash_ch);
// vector <Transaction::pointer> vet;
Account::pointer acc = Bubi::last_ledger->get_account_entry (hash);
uint256 tx_hash;
std::uint32_t tx_seq;
tx_seq = acc->get_previous_ledger_seq ();
tx_hash = acc->get_previous_tx_hash ();
while ( tx_seq != 0 ){
Transaction::pointer tx = Bubi::last_ledger->get_transaction_entry (tx_hash);
std::cout << "------------------------------------" << std::endl;
std::cout << tx->get_source_address ().to_string () << std::endl;
std::cout << tx->get_destination_address ().to_string () << std::endl;
std::cout << tx->get_payment_amount () << std::endl;
if (hash == tx->get_source_address ()){
tx_seq = tx->get_source_previous_ledger_seq ();
tx_hash = tx->get_source_previous_tx_hash ();
}
else {
tx_seq = tx->get_destination_previous_ledger_seq ();
tx_hash = tx->get_destination_previous_tx_hash ();
}
}
}