Skip to content
Snippets Groups Projects
Commit b8a30ffa authored by xiphon's avatar xiphon
Browse files

wallet: option to rescan from a specific height with 'monero:notify'

parent 1363deb8
No related branches found
No related tags found
No related merge requests found
...@@ -15,7 +15,8 @@ class walletNotify extends Command ...@@ -15,7 +15,8 @@ class walletNotify extends Command
* *
* @var string * @var string
*/ */
protected $signature = 'monero:notify'; protected $signature = 'monero:notify
{height? : Scan wallet transactions starting from the specified height}';
/** /**
* The console command description. * The console command description.
...@@ -50,7 +51,7 @@ class walletNotify extends Command ...@@ -50,7 +51,7 @@ class walletNotify extends Command
return; return;
} }
$min_height = Deposit::max('block_received'); $min_height = $this->argument('height') ?? Deposit::max('block_received');
$transactions = $wallet->scanIncomingTransfers(max($min_height, 50) - 50); $transactions = $wallet->scanIncomingTransfers(max($min_height, 50) - 50);
$transactions->each(function ($transaction) use ($wallet) { $transactions->each(function ($transaction) use ($wallet) {
$this->processPayment($transaction); $this->processPayment($transaction);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment