Skip to content

Commit

Permalink
MERGE use rpc to identify testnet 11
Browse files Browse the repository at this point in the history
kaspanet#2211

transposed to karlsen-testnet-1
Dev committed Dec 17, 2023
1 parent 3eb6c93 commit 8efb6e6
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -106,9 +106,16 @@ func (s *server) selectUTXOs(spendAmount uint64, isSendAll bool, feePerInput uin
return nil, 0, 0, err
}

coinbaseMaturity := s.params.BlockCoinbaseMaturity
// merged from kaspa-testnet-11
// https://github.com/kaspanet/kaspad/commit/8e71f79f98a1b365aa19220b3fcdd4d5ad1df4c4
if dagInfo.NetworkName == "karlsen-testnet-1" {
coinbaseMaturity = 1000
}

for _, utxo := range s.utxosSortedByAmount {
if (fromAddresses != nil && !slices.Contains(fromAddresses, utxo.address)) ||
!isUTXOSpendable(utxo, dagInfo.VirtualDAAScore, s.params.BlockCoinbaseMaturity) {
!isUTXOSpendable(utxo, dagInfo.VirtualDAAScore, coinbaseMaturity) {
continue
}

0 comments on commit 8efb6e6

Please sign in to comment.