Browse Source

Add threshold config

refactor
Hampus Sjöberg 4 years ago
parent
commit
e80623e0a3
  1. 3
      config/config.ts_TEMPLATE
  2. 2
      frontend/pages/index.tsx

3
config/config.ts_TEMPLATE

@ -26,6 +26,8 @@ interface Config {
info: string[]; info: string[];
// The BIP9 version bit as defined in the softfork's BIP. // The BIP9 version bit as defined in the softfork's BIP.
versionBit: number; versionBit: number;
// Threshold for the softfork to be locked in
threshold: number;
}; };
} }
@ -45,6 +47,7 @@ const config: Config = {
name: "Taproot", name: "Taproot",
info: [], info: [],
versionBit: 2, versionBit: 2,
threshold: 1845,
}, },
}; };

2
frontend/pages/index.tsx

@ -67,7 +67,7 @@ export default function Blocks() {
const forkName = config.fork.name; const forkName = config.fork.name;
const treshhold = Math.floor(2016 * 0.9); const treshhold = config.fork.threshold;
const currentNumberOfSignallingBlocks = blocks.reduce( const currentNumberOfSignallingBlocks = blocks.reduce(
(prev, currentBlock) => prev + +(currentBlock.signals ?? false), (prev, currentBlock) => prev + +(currentBlock.signals ?? false),
0 0

Loading…
Cancel
Save