Skip to content

Commit

Permalink
fix: receiving spontaneous payment not setting correct last_update
Browse files Browse the repository at this point in the history
  • Loading branch information
rolznz committed Jun 3, 2024
1 parent 615d714 commit 7aafdbf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use core::task::{Poll, Waker};
use std::collections::VecDeque;
use std::ops::Deref;
use std::sync::{Arc, Condvar, Mutex, RwLock};
use std::time::Duration;
use std::time::{self, Duration};

/// An event emitted by [`Node`], which should be handled by the user.
///
Expand Down Expand Up @@ -630,7 +630,10 @@ where
amount_msat: Some(amount_msat),
direction: PaymentDirection::Inbound,
status: PaymentStatus::Succeeded,
last_update: 0,
last_update: time::SystemTime::now()
.duration_since(time::UNIX_EPOCH)
.unwrap_or(time::Duration::ZERO)
.as_secs(),
fee_msat: None,
};

Expand Down

0 comments on commit 7aafdbf

Please sign in to comment.