What changed, and why it matters
This commit increases the default Peercoin transaction fee rate from 5000 to 10000 satoshis per kilobyte and adds a test to verify the new value. It is a routine fee policy adjustment, not a security fix. The only code change besides the fee value is a minor formatting/indentation cleanup in an unrelated address derivation block.
No security action required. Review as a normal fee policy update; ensure the new rate aligns with current Peercoin network conditions and user expectations.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change updates defaultFeeRate in lib/wallets/crypto_currency/coins/peercoin.dart from BigInt.from(5000) to BigInt.from(10000). A new unit test test/wallets/peercoin_policy_test.dart asserts the new default. The diff also reformats a P2WPKHAddress.fromPublicKey call by removing unnecessary line breaks. There is no evidence of a vulnerability, bug fix, or security-relevant behavior change.
Changed components
lib/wallets/crypto_currency/coins/peercoin.darttest/wallets/peercoin_policy_test.dartInspect captured patch +15 / −6
diff --git a/lib/wallets/crypto_currency/coins/peercoin.dart b/lib/wallets/crypto_currency/coins/peercoin.dart
index 0515beb..a3241e2 100644
--- a/lib/wallets/crypto_currency/coins/peercoin.dart
+++ b/lib/wallets/crypto_currency/coins/peercoin.dart
@@ -165,11 +165,10 @@ class Peercoin extends Bip39HDCurrency with ElectrumXCurrencyInterface {
return (address: addr, addressType: AddressType.p2pkh);
case DerivePathType.bip49:
- final p2wpkhScript =
- coinlib.P2WPKHAddress.fromPublicKey(
- publicKey,
- hrp: networkParams.bech32Hrp,
- ).program.script;
+ final p2wpkhScript = coinlib.P2WPKHAddress.fromPublicKey(
+ publicKey,
+ hrp: networkParams.bech32Hrp,
+ ).program.script;
final addr = coinlib.P2SHAddress.fromRedeemScript(
p2wpkhScript,
@@ -266,5 +265,5 @@ class Peercoin extends Bip39HDCurrency with ElectrumXCurrencyInterface {
int get transactionVersion => 3;
@override
- BigInt get defaultFeeRate => BigInt.from(5000);
+ BigInt get defaultFeeRate => BigInt.from(10000);
}
diff --git a/test/wallets/peercoin_policy_test.dart b/test/wallets/peercoin_policy_test.dart
new file mode 100644
index 0000000..45877a0
--- /dev/null
+++ b/test/wallets/peercoin_policy_test.dart
@@ -0,0 +1,10 @@
+import 'package:flutter_test/flutter_test.dart';
+import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart';
+
+void main() {
+ test('Peercoin fallback fee uses the fixed network rate', () {
+ final peercoin = Peercoin(CryptoCurrencyNetwork.main);
+
+ expect(peercoin.defaultFeeRate, BigInt.from(10000));
+ });
+}
Why this scored 19/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.