Skip to content

Commit

Permalink
Merge branch 'janoside:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Cryptocurrencei authored May 9, 2024
2 parents c8345f0 + adb8071 commit 80833ea
Show file tree
Hide file tree
Showing 12 changed files with 1,522 additions and 1,174 deletions.
2 changes: 1 addition & 1 deletion app/api/coreApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -2029,7 +2029,7 @@ function buildPredictedBlocks(statusId, statusFunc) {
feeRateGroup = Math.floor(feeRateGroup / 5) * 5;

} else {
console.log(JSON.stringify(tx));
//console.log(JSON.stringify(tx));
}

feeRateGroup = Math.floor(feeRateGroup);
Expand Down
5 changes: 5 additions & 0 deletions app/coins/btcHolidays.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ module.exports = {
name: "First Transaction Day",
date: "2009-01-12",
desc: "On this day in 2009, Satoshi transferred BTC via <a href='./tx/f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16'>the first ever (non-coinbase) transaction</a>. The recipient of that historic transaction is none other than Hal Finney."
},
{
name: "Halving #4 Day",
date: "2024-04-20",
desc: "On this day in 2024, just after midnight UTC, the fourth \"Halving\" cut the subsidy from 6.25 BTC to 3.125 BTC."
}
]
};
61 changes: 59 additions & 2 deletions app/coins/btcQuotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ module.exports = {
// 40
text: "No one has found the bottom of the Bitcoin rabbit hole.",
speaker: "Jameson Lopp",
date: "2010-11-10",
date: "2018-11-10",
url: "https://twitter.com/lopp/status/1061415918616698881"
},
{
Expand Down Expand Up @@ -664,7 +664,64 @@ module.exports = {
speaker: "Robert Breedlove",
url: "https://x.com/Swan/status/1723049733420097996",
date: "2023-11-10"
}
},
{
// 94
text: "Bitcoin is just an honest ledger that's pricing the real market.",
speaker: "Jeff Booth",
url: "https://www.youtube.com/watch?v=iXIiS_k-Gic",
date: "2023-11-22"
},
{
// 95
text: "I don’t think humanity has grasped the moral implications of, for the first time ever in human history, having a truly honest way to account for time and energy.",
speaker: "Jeff Booth",
url: "https://www.youtube.com/watch?v=iXIiS_k-Gic",
date: "2023-11-22"
},
{
// 96
text: "Who is Satoshi Nakamoto?",
speaker: "Michael Saylor",
url: "https://x.com/CedYoungelman/status/1735502677969088533",
date: "2023-12-14"
},
{
// 97
text: "Bitcoin is the human discovery of money. People have been experimenting with barter, beads, commodities, rocks, metals, and government promises for the last 10,000 years and Satoshi solved that problem in 2009.",
speaker: "dueyfromstlouis",
url: "https://x.com/dueyfromstlouis/status/1749129961922035929",
date: "2024-01-21"
},
{
// 98
text: "Hodling bitcoin is an extreme version of the marshmallow test that never ends.",
speaker: "Jameson Lopp",
url: "https://x.com/lopp/status/1578272200204996609",
date: "2022-10-07"
},
{
// 99
text: "If Bitcoin were [to] become the ultimate form of currency [to be] adopted by human society, I can tell you exactly what's gonna happen as the worst scenario...we're all gonna die. This is not a joke.",
speaker: "Chinese State Broadcaster",
url: "https://x.com/RussellOkung/status/1398262571199762433",
date: "2021-05-28"
},
{
// 100
text: "The lesson of Bitcoin is: bitcoin is the best asset, there is no second best asset, buy bitcoin, keep buying bitcoin, don't sell the bitcoin.",
speaker: "Michael Saylor",
url: "https://x.com/TheBTCTherapist/status/1765420027837055306?s=20",
date: "2024-03-06"
},
{
// 101
text: "Whoever gets the most bitcoin wins. There is no other end game.”",
speaker: "Michael Saylor",
url: "https://x.com/Swan/status/1767646389532540945?s=20",
date: "2024-03-12"
},

/*{
text: "Bitcoin is a technological tour de force.",
speaker: "Bill Gates",
Expand Down
6 changes: 4 additions & 2 deletions app/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ function summarizeDuration(duration, options={}) {
let stripZeroes = "stripZeroes" in options ? options.stripZeroes : true;
let shortenDurationNames = "shortenDurationNames" in options ? options.shortenDurationNames : true;
let outputCommas = "outputCommas" in options ? options.outputCommas : true;
let decimalPlaces = "decimalPlaces" in options ? options.decimalPlaces : 1;

//console.log(JSON.stringify(options) + " - " + oneElement + " - " + stripZeroes + " - " + shortenDurationNames + " - " + outputCommas);

Expand All @@ -491,7 +492,7 @@ function summarizeDuration(duration, options={}) {

for (let i = 0; i < parts.length; i++) {
if (parts[i] > 1) {
str = `${new Decimal(parts[i]).toDP(1)} ${partNames[i]}`;
str = `${new Decimal(parts[i]).toDP(decimalPlaces)} ${partNames[i]}`;

break;
}
Expand Down Expand Up @@ -1456,7 +1457,8 @@ function nextHalvingEstimates(eraStartBlockHeader, currentBlockHeader, difficult
difficultyAdjustmentData = difficultyAdjustmentEstimates(eraStartBlockHeader, currentBlockHeader);
}

let currDifficultyEraTimeDifferential = (coinConfig.targetBlockTimeSeconds - difficultyAdjustmentData.timePerBlock) * difficultyAdjustmentData.blocksLeft;
let blockCountAffectedByCurrentDifficultyDelta = Math.min(difficultyAdjustmentData.blocksLeft, blocksUntilNextHalving);
let currDifficultyEraTimeDifferential = (coinConfig.targetBlockTimeSeconds - difficultyAdjustmentData.timePerBlock) * blockCountAffectedByCurrentDifficultyDelta;


let secondsUntilNextHalving = blocksUntilNextHalving * targetBlockTimeSeconds - currDifficultyEraTimeDifferential;
Expand Down
Loading

0 comments on commit 80833ea

Please sign in to comment.