mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Add comments to explain the Payment's ReceivedTime
This commit is contained in:
@@ -921,10 +921,9 @@ namespace BTCPayServer.Services.Invoices
|
|||||||
public BTCPayNetworkBase Network { get; set; }
|
public BTCPayNetworkBase Network { get; set; }
|
||||||
public int Version { get; set; }
|
public int Version { get; set; }
|
||||||
|
|
||||||
|
|
||||||
// Old invoices use ReceivedTimeSeconds whose precision is not sufficient
|
|
||||||
[Obsolete("Use ReceivedTime instead")]
|
[Obsolete("Use ReceivedTime instead")]
|
||||||
[JsonProperty("receivedTime", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
[JsonProperty("receivedTime", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||||
|
// Old invoices were storing the received time in second
|
||||||
public DateTimeOffset? ReceivedTimeSeconds
|
public DateTimeOffset? ReceivedTimeSeconds
|
||||||
{
|
{
|
||||||
get; set;
|
get; set;
|
||||||
@@ -932,6 +931,9 @@ namespace BTCPayServer.Services.Invoices
|
|||||||
[Obsolete("Use ReceivedTime instead")]
|
[Obsolete("Use ReceivedTime instead")]
|
||||||
[JsonProperty("receivedTimeMs", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
[JsonProperty("receivedTimeMs", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||||
[JsonConverter(typeof(DateTimeMilliJsonConverter))]
|
[JsonConverter(typeof(DateTimeMilliJsonConverter))]
|
||||||
|
// Our RBF detection logic depends on properly ordering payments based on
|
||||||
|
// received time, so we needed a received time in milli to ensure that
|
||||||
|
// even if payments are separated by less than a second, they would still be ordering
|
||||||
public DateTimeOffset? ReceivedTimeMilli
|
public DateTimeOffset? ReceivedTimeMilli
|
||||||
{
|
{
|
||||||
get; set;
|
get; set;
|
||||||
|
|||||||
Reference in New Issue
Block a user