mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-23 12:35:50 +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)
|
<< 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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ enum LedgerEntryType
|
|||||||
ltCONTRACT = 'c',
|
ltCONTRACT = 'c',
|
||||||
ltLEDGER_HASHES = 'h',
|
ltLEDGER_HASHES = 'h',
|
||||||
ltFEATURES = 'f',
|
ltFEATURES = 'f',
|
||||||
|
ltFEE_SETTINGS = 's',
|
||||||
};
|
};
|
||||||
|
|
||||||
// Used as a prefix for computing ledger indexes (keys).
|
// Used as a prefix for computing ledger indexes (keys).
|
||||||
@@ -32,6 +33,7 @@ enum LedgerNameSpace
|
|||||||
spaceContract = 'c',
|
spaceContract = 'c',
|
||||||
spaceSkipList = 's',
|
spaceSkipList = 's',
|
||||||
spaceFeature = 'f',
|
spaceFeature = 'f',
|
||||||
|
spaceFee = 's',
|
||||||
};
|
};
|
||||||
|
|
||||||
enum LedgerSpecificFlags
|
enum LedgerSpecificFlags
|
||||||
|
|||||||
@@ -60,6 +60,9 @@
|
|||||||
FIELD(LastLedgerSequence, UINT32, 27)
|
FIELD(LastLedgerSequence, UINT32, 27)
|
||||||
FIELD(TransactionIndex, UINT32, 28)
|
FIELD(TransactionIndex, UINT32, 28)
|
||||||
FIELD(OperationLimit, UINT32, 29)
|
FIELD(OperationLimit, UINT32, 29)
|
||||||
|
FIELD(ReferenceFeeUnits, UINT32, 30)
|
||||||
|
FIELD(ReserveBase, UINT32, 31)
|
||||||
|
FIELD(ReserveIncrement, UINT32, 32)
|
||||||
|
|
||||||
// 64-bit integers
|
// 64-bit integers
|
||||||
FIELD(IndexNext, UINT64, 1)
|
FIELD(IndexNext, UINT64, 1)
|
||||||
@@ -69,6 +72,7 @@
|
|||||||
FIELD(BaseFee, UINT64, 5)
|
FIELD(BaseFee, UINT64, 5)
|
||||||
FIELD(ExchangeRate, UINT64, 6)
|
FIELD(ExchangeRate, UINT64, 6)
|
||||||
|
|
||||||
|
|
||||||
// 128-bit
|
// 128-bit
|
||||||
FIELD(EmailHash, HASH128, 1)
|
FIELD(EmailHash, HASH128, 1)
|
||||||
|
|
||||||
|
|||||||
@@ -76,6 +76,14 @@ static bool TFInit()
|
|||||||
<< SOElement(sfFeature, SOE_REQUIRED)
|
<< 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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
enum TransactionType
|
enum TransactionType
|
||||||
{
|
{
|
||||||
ttINVALID = -1,
|
ttINVALID = -1,
|
||||||
|
|
||||||
ttPAYMENT = 0,
|
ttPAYMENT = 0,
|
||||||
ttCLAIM = 1, // open
|
ttCLAIM = 1, // open
|
||||||
ttWALLET_ADD = 2,
|
ttWALLET_ADD = 2,
|
||||||
@@ -21,6 +22,7 @@ enum TransactionType
|
|||||||
ttTRUST_SET = 20,
|
ttTRUST_SET = 20,
|
||||||
|
|
||||||
ttFEATURE = 100,
|
ttFEATURE = 100,
|
||||||
|
ttFEE = 101,
|
||||||
};
|
};
|
||||||
|
|
||||||
class TransactionFormat
|
class TransactionFormat
|
||||||
|
|||||||
Reference in New Issue
Block a user