mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-25 05:25:55 +00:00
Begin the infrastructure for putting fees in the ledger.
This commit is contained in:
@@ -103,6 +103,13 @@ static bool LEFInit()
|
||||
<< SOElement(sfFeatures, SOE_REQUIRED)
|
||||
;
|
||||
|
||||
DECLARE_LEF(FeeSettings, ltFEE_SETTINGS)
|
||||
<< SOElement(sfBaseFee, SOE_REQUIRED)
|
||||
<< SOElement(sfReferenceFeeUnits, SOE_REQUIRED)
|
||||
<< SOElement(sfReserveBase, SOE_REQUIRED)
|
||||
<< SOElement(sfReserveIncrement, SOE_REQUIRED)
|
||||
;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ enum LedgerEntryType
|
||||
ltCONTRACT = 'c',
|
||||
ltLEDGER_HASHES = 'h',
|
||||
ltFEATURES = 'f',
|
||||
ltFEE_SETTINGS = 's',
|
||||
};
|
||||
|
||||
// Used as a prefix for computing ledger indexes (keys).
|
||||
@@ -32,6 +33,7 @@ enum LedgerNameSpace
|
||||
spaceContract = 'c',
|
||||
spaceSkipList = 's',
|
||||
spaceFeature = 'f',
|
||||
spaceFee = 's',
|
||||
};
|
||||
|
||||
enum LedgerSpecificFlags
|
||||
|
||||
@@ -60,6 +60,9 @@
|
||||
FIELD(LastLedgerSequence, UINT32, 27)
|
||||
FIELD(TransactionIndex, UINT32, 28)
|
||||
FIELD(OperationLimit, UINT32, 29)
|
||||
FIELD(ReferenceFeeUnits, UINT32, 30)
|
||||
FIELD(ReserveBase, UINT32, 31)
|
||||
FIELD(ReserveIncrement, UINT32, 32)
|
||||
|
||||
// 64-bit integers
|
||||
FIELD(IndexNext, UINT64, 1)
|
||||
@@ -69,6 +72,7 @@
|
||||
FIELD(BaseFee, UINT64, 5)
|
||||
FIELD(ExchangeRate, UINT64, 6)
|
||||
|
||||
|
||||
// 128-bit
|
||||
FIELD(EmailHash, HASH128, 1)
|
||||
|
||||
|
||||
@@ -76,6 +76,14 @@ static bool TFInit()
|
||||
<< SOElement(sfFeature, SOE_REQUIRED)
|
||||
;
|
||||
|
||||
DECLARE_TF(SetFee, ttFEE)
|
||||
<< SOElement(sfFeatures, SOE_REQUIRED)
|
||||
<< SOElement(sfBaseFee, SOE_REQUIRED)
|
||||
<< SOElement(sfReferenceFeeUnits, SOE_REQUIRED)
|
||||
<< SOElement(sfReserveBase, SOE_REQUIRED)
|
||||
<< SOElement(sfReserveIncrement, SOE_REQUIRED)
|
||||
;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
enum TransactionType
|
||||
{
|
||||
ttINVALID = -1,
|
||||
|
||||
ttPAYMENT = 0,
|
||||
ttCLAIM = 1, // open
|
||||
ttWALLET_ADD = 2,
|
||||
@@ -21,6 +22,7 @@ enum TransactionType
|
||||
ttTRUST_SET = 20,
|
||||
|
||||
ttFEATURE = 100,
|
||||
ttFEE = 101,
|
||||
};
|
||||
|
||||
class TransactionFormat
|
||||
|
||||
Reference in New Issue
Block a user