Remove obsolete TargetLedger support from TransactionFromats.

This commit is contained in:
Arthur Britto
2012-05-17 20:33:14 -07:00
parent 3842b0ef8d
commit b8333f8d92
3 changed files with 10 additions and 25 deletions

View File

@@ -57,8 +57,7 @@ Transaction::Transaction(
const NewcoinAddress& naSourceAccount,
uint32 uSeq,
uint64 uFee,
uint32 uSourceTag,
uint32 uLedger) :
uint32 uSourceTag) :
mStatus(NEW)
{
mAccountFrom = naSourceAccount;
@@ -79,12 +78,6 @@ Transaction::Transaction(
mTransaction->makeITFieldPresent(sfSourceTag);
mTransaction->setITFieldU32(sfSourceTag, uSourceTag);
}
if (uLedger)
{
mTransaction->makeITFieldPresent(sfTargetLedger);
mTransaction->setITFieldU32(sfTargetLedger, uLedger);
}
}
bool Transaction::sign(const NewcoinAddress& naAccountPrivate)
@@ -179,13 +172,12 @@ Transaction::pointer Transaction::sharedCreate(
uint32 uSeq,
uint64 uFee,
uint32 uSourceTag,
uint32 uLedger,
const NewcoinAddress& naCreateAccountID,
uint64 uFund)
{
pointer tResult = boost::make_shared<Transaction>(ttPAYMENT,
naPublicKey, naSourceAccount,
uSeq, uFee, uSourceTag, uLedger);
uSeq, uFee, uSourceTag);
return tResult->setCreate(naPrivateKey, naCreateAccountID, uFund);
}
@@ -213,13 +205,12 @@ Transaction::pointer Transaction::sharedPayment(
uint32 uSeq,
uint64 uFee,
uint32 uSourceTag,
uint32 uLedger,
const NewcoinAddress& toAccount,
uint64 uAmount)
{
pointer tResult = boost::make_shared<Transaction>(ttPAYMENT,
naPublicKey, naSourceAccount,
uSeq, uFee, uSourceTag, uLedger);
uSeq, uFee, uSourceTag);
return tResult->setPayment(naPrivateKey, toAccount, uAmount);
}

View File

@@ -74,8 +74,7 @@ public:
const NewcoinAddress& naSourceAccount, // To identify the paying account.
uint32 uSeq, // To order transactions.
uint64 uFee, // Transaction fee.
uint32 uSourceTag, // User call back value.
uint32 uLedger=0);
uint32 uSourceTag); // User call back value.
// Claim a wallet.
static Transaction::pointer sharedClaim(
@@ -93,7 +92,6 @@ public:
uint32 uSeq,
uint64 uFee,
uint32 uSourceTag,
uint32 uLedger,
const NewcoinAddress& naCreateAccountID, // Account to create.
uint64 uFund); // Initial funds in XNC.
@@ -104,7 +102,6 @@ public:
uint32 uSeq,
uint64 uFee,
uint32 uSourceTag,
uint32 uLedger,
const NewcoinAddress& toAccount,
uint64 uAmount);

View File

@@ -11,8 +11,7 @@ TransactionFormat InnerTxnFormats[]=
{ S_FIELD(Amount), STI_AMOUNT, SOE_REQUIRED, 0 },
{ S_FIELD(Currency), STI_HASH160, SOE_IFFLAG, 1 },
{ S_FIELD(SourceTag), STI_UINT32, SOE_IFFLAG, 2 },
{ S_FIELD(TargetLedger), STI_UINT32, SOE_IFFLAG, 4 },
{ S_FIELD(InvoiceID), STI_HASH256, SOE_IFFLAG, 8 },
{ S_FIELD(InvoiceID), STI_HASH256, SOE_IFFLAG, 4 },
{ S_FIELD(Extensions), STI_TL, SOE_IFFLAG, 0x02000000 },
{ sfInvalid, NULL, STI_DONE, SOE_NEVER, -1 } }
},
@@ -32,8 +31,7 @@ TransactionFormat InnerTxnFormats[]=
{ S_FIELD(Currency), STI_HASH160, SOE_IFFLAG, 1 },
{ S_FIELD(SourceTag), STI_UINT32, SOE_IFFLAG, 2 },
{ S_FIELD(Destination), STI_ACCOUNT, SOE_IFFLAG, 4 },
{ S_FIELD(TargetLedger), STI_UINT32, SOE_IFFLAG, 8 },
{ S_FIELD(Identifier), STI_VL, SOE_IFFLAG, 16 },
{ S_FIELD(Identifier), STI_VL, SOE_IFFLAG, 8 },
{ S_FIELD(Extensions), STI_TL, SOE_IFFLAG, 0x02000000 },
{ sfInvalid, NULL, STI_DONE, SOE_NEVER, -1 } }
},
@@ -45,9 +43,8 @@ TransactionFormat InnerTxnFormats[]=
{ S_FIELD(CurrencyOut), STI_HASH160, SOE_IFFLAG, 4 },
{ S_FIELD(SourceTag), STI_UINT32, SOE_IFFLAG, 8 },
{ S_FIELD(Destination), STI_ACCOUNT, SOE_IFFLAG, 16 },
{ S_FIELD(TargetLedger), STI_UINT32, SOE_IFFLAG, 32 },
{ S_FIELD(ExpireLedger), STI_UINT32, SOE_IFFLAG, 64 },
{ S_FIELD(Identifier), STI_VL, SOE_IFFLAG, 128 },
{ S_FIELD(ExpireLedger), STI_UINT32, SOE_IFFLAG, 32 },
{ S_FIELD(Identifier), STI_VL, SOE_IFFLAG, 64 },
{ S_FIELD(Extensions), STI_TL, SOE_IFFLAG, 0x02000000 },
{ sfInvalid, NULL, STI_DONE, SOE_NEVER, -1 } }
},