本文整理汇总了C++中STObject::setFieldU64方法的典型用法代码示例。如果您正苦于以下问题:C++ STObject::setFieldU64方法的具体用法?C++ STObject::setFieldU64怎么用?C++ STObject::setFieldU64使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类STObject
的用法示例。
在下文中一共展示了STObject::setFieldU64方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
FeeVoteImpl::doValidation (Ledger::ref lastClosedLedger,
STObject& baseValidation)
{
if (lastClosedLedger->getBaseFee () != target_.reference_fee)
{
if (journal_.info) journal_.info <<
"Voting for base fee of " << target_.reference_fee;
baseValidation.setFieldU64 (sfBaseFee, target_.reference_fee);
}
if (lastClosedLedger->getReserve (0) != target_.account_reserve)
{
if (journal_.info) journal_.info <<
"Voting for base resrve of " << target_.account_reserve;
baseValidation.setFieldU32(sfReserveBase, target_.account_reserve);
}
if (lastClosedLedger->getReserveInc () != target_.owner_reserve)
{
if (journal_.info) journal_.info <<
"Voting for reserve increment of " << target_.owner_reserve;
baseValidation.setFieldU32 (sfReserveIncrement,
target_.owner_reserve);
}
}
示例2:
void
FeeVoteImpl::doValidation(
std::shared_ptr<ReadView const> const& lastClosedLedger,
STObject& baseValidation)
{
if (lastClosedLedger->fees().base != target_.reference_fee)
{
if (journal_.info) journal_.info <<
"Voting for base fee of " << target_.reference_fee;
baseValidation.setFieldU64 (sfBaseFee, target_.reference_fee);
}
if (lastClosedLedger->fees().accountReserve(0) != target_.account_reserve)
{
if (journal_.info) journal_.info <<
"Voting for base resrve of " << target_.account_reserve;
baseValidation.setFieldU32(sfReserveBase, target_.account_reserve);
}
if (lastClosedLedger->fees().increment != target_.owner_reserve)
{
if (journal_.info) journal_.info <<
"Voting for reserve increment of " << target_.owner_reserve;
baseValidation.setFieldU32 (sfReserveIncrement,
target_.owner_reserve);
}
}