Use STPathSet in place of STPath in transactions.

This commit is contained in:
Arthur Britto
2012-05-20 23:43:02 -07:00
parent 261fab7108
commit 1e9304f8c6
9 changed files with 16 additions and 17 deletions

View File

@@ -191,21 +191,19 @@ Transaction::pointer Transaction::setPayment(
const NewcoinAddress& toAccount,
const STAmount& saAmount,
const STAmount& saSendMax,
const STPath& spPaths)
const STPathSet& spPaths)
{
mTransaction->setITFieldAccount(sfDestination, toAccount);
mTransaction->setITFieldAmount(sfAmount, saAmount);
if (saAmount != saSendMax)
{
mTransaction->makeITFieldPresent(sfSendMax);
mTransaction->setITFieldAmount(sfSendMax, saSendMax);
}
if (!spPaths.emptyPath())
if (spPaths.getPathCount())
{
mTransaction->makeITFieldPresent(sfPaths);
mTransaction->setITFieldPath(sfPaths, spPaths);
mTransaction->setITFieldPathSet(sfPaths, spPaths);
}
sign(naPrivateKey);
@@ -222,7 +220,7 @@ Transaction::pointer Transaction::sharedPayment(
const NewcoinAddress& toAccount,
const STAmount& saAmount,
const STAmount& saSendMax,
const STPath& saPaths)
const STPathSet& saPaths)
{
pointer tResult = boost::make_shared<Transaction>(ttPAYMENT,
naPublicKey, naSourceAccount,