Clean up - Ledger breaking changes.

This commit is contained in:
Arthur Britto
2012-12-21 17:05:31 -08:00
parent 5f38aed8a0
commit c05d4fb559
5 changed files with 7 additions and 9 deletions

View File

@@ -19,6 +19,7 @@ static bool LEFInit()
<< SOElement(sfAccount, SOE_REQUIRED) << SOElement(sfAccount, SOE_REQUIRED)
<< SOElement(sfSequence, SOE_REQUIRED) << SOElement(sfSequence, SOE_REQUIRED)
<< SOElement(sfBalance, SOE_REQUIRED) << SOElement(sfBalance, SOE_REQUIRED)
<< SOElement(sfOwnerCount, SOE_REQUIRED)
<< SOElement(sfPreviousTxnID, SOE_REQUIRED) << SOElement(sfPreviousTxnID, SOE_REQUIRED)
<< SOElement(sfPreviousTxnLgrSeq, SOE_REQUIRED) << SOElement(sfPreviousTxnLgrSeq, SOE_REQUIRED)
<< SOElement(sfRegularKey, SOE_OPTIONAL) << SOElement(sfRegularKey, SOE_OPTIONAL)
@@ -28,7 +29,6 @@ static bool LEFInit()
<< SOElement(sfMessageKey, SOE_OPTIONAL) << SOElement(sfMessageKey, SOE_OPTIONAL)
<< SOElement(sfTransferRate, SOE_OPTIONAL) << SOElement(sfTransferRate, SOE_OPTIONAL)
<< SOElement(sfDomain, SOE_OPTIONAL) << SOElement(sfDomain, SOE_OPTIONAL)
<< SOElement(sfOwnerCount, SOE_OPTIONAL)
; ;
DECLARE_LEF(Contract, ltCONTRACT) DECLARE_LEF(Contract, ltCONTRACT)

View File

@@ -43,7 +43,7 @@
FIELD(Expiration, UINT32, 10) FIELD(Expiration, UINT32, 10)
FIELD(TransferRate, UINT32, 11) FIELD(TransferRate, UINT32, 11)
FIELD(WalletSize, UINT32, 12) FIELD(WalletSize, UINT32, 12)
FIELD(OwnerCount, UINT32, 13) // Reorder on ledger reset. FIELD(OwnerCount, UINT32, 13)
// 32-bit integers (uncommon) // 32-bit integers (uncommon)
FIELD(HighQualityIn, UINT32, 16) FIELD(HighQualityIn, UINT32, 16)

View File

@@ -62,11 +62,10 @@ const int TransactionMaxLen = 1048576;
const uint32 tfPassive = 0x00010000; const uint32 tfPassive = 0x00010000;
const uint32 tfOfferCreateMask = ~(tfPassive); const uint32 tfOfferCreateMask = ~(tfPassive);
// Payment flags: (renumber on ledger wipe) // Payment flags:
const uint32 tfPaymentLegacy = 0x00010000; // Left here to avoid ledger change. const uint32 tfNoRippleDirect = 0x00010000;
const uint32 tfPartialPayment = 0x00020000; const uint32 tfPartialPayment = 0x00020000;
const uint32 tfLimitQuality = 0x00040000; const uint32 tfLimitQuality = 0x00040000;
const uint32 tfNoRippleDirect = 0x00080000;
const uint32 tfPaymentMask = ~(tfPartialPayment|tfLimitQuality|tfNoRippleDirect); const uint32 tfPaymentMask = ~(tfPartialPayment|tfLimitQuality|tfNoRippleDirect);

View File

@@ -267,10 +267,9 @@ Remote.flags = {
}, },
'Payment' : { 'Payment' : {
'PaymentLegacy' : 0x00010000, 'NoRippleDirect' : 0x00010000,
'PartialPayment' : 0x00020000, 'PartialPayment' : 0x00020000,
'LimitQuality' : 0x00040000, 'LimitQuality' : 0x00040000,
'NoRippleDirect' : 0x00080000,
}, },
}; };

View File

@@ -346,9 +346,9 @@ buster.testCase("Offer tests", {
testutils.create_accounts(self.remote, "root", "10000.0", ["alice", "bob", "mtgox"], callback); testutils.create_accounts(self.remote, "root", "10000.0", ["alice", "bob", "mtgox"], callback);
}, },
function (callback) { function (callback) {
self.what = "Owner count undefined."; self.what = "Owner count 0.";
testutils.verify_owner_count(self.remote, "bob", undefined, callback); testutils.verify_owner_count(self.remote, "bob", 0, callback);
}, },
function (callback) { function (callback) {
self.what = "Set limits."; self.what = "Set limits.";