Skip to content

Commit 0f18e6b

Browse files
authored
Disallow decimal npayments and monthly payments (#580)
1 parent 6a49fa7 commit 0f18e6b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scripts/masternode.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,13 +567,15 @@ export default class Masternode {
567567
}
568568

569569
if (
570+
!Number.isInteger(nPayments) ||
570571
nPayments < 1 ||
571572
nPayments > cChainParams.current.maxPaymentCycles
572573
) {
573574
return { ok: false, err: 'invalid_payment_count' };
574575
}
575576

576577
if (
578+
!Number.isInteger(monthlyPayment) ||
577579
monthlyPayment < 10 * COIN ||
578580
monthlyPayment * nPayments > cChainParams.current.maxPayment
579581
) {

0 commit comments

Comments
 (0)