Skip to content

Instantly share code, notes, and snippets.

@ftrader
ftrader / 202006_BCHN-PCS_CPFP_survey-en.md
Created June 17, 2020 10:30
Bitcoin Cash Node Public Consultation System - June 2020 Survey on CPFP

Bitcoin Cash Node Public Consultation System - June 2020 Survey on CPFP

This is a community survey by the Bitcoin Cash Node project, to gather feedback on who is using the Child-Pays-For-Parent feature in Bitcoin Cash (BCH) and what those use cases are.

See the bottom section for information on how to fill out and submit your feedback to us.

%< --- BEGIN feedback section --- you can cut your reply here ---

@ftrader
ftrader / freetrader_statement_about_singularity_9_March_2018_15pm_UTC
Created March 9, 2018 15:14
freetrader statement about singularity, 9 March 2018 15pm UTC
Since I joined BTCfork slack (and I think I was one of the earliest to
join), I never heard singularity (/u/singularity87, Paul Wasensteiner)
tell anyone that he founded Skype, nor did I read such a claim from him
anywhere else.
When he took the handle "Michael Jackson" on the Slack it was clear to
me that it was a pseudonym, because at that stage he was reluctant to
reveal his real life identity. At no time did he try to pass it off as
his real name to myself.
@ftrader
ftrader / cashaddrenc_tests.patch
Created November 29, 2017 21:53
cashaddrenc_tests patch for older compilers
diff --git a/src/test/cashaddrenc_tests.cpp b/src/test/cashaddrenc_tests.cpp
index 4b7298f..b50375a 100644
--- a/src/test/cashaddrenc_tests.cpp
+++ b/src/test/cashaddrenc_tests.cpp
@@ -80,7 +80,7 @@ BOOST_AUTO_TEST_CASE(invalid_on_wrong_network) {
std::string encoded = EncodeCashAddr(dst, Params(net));
CTxDestination decoded = DecodeCashAddr(encoded, Params(otherNet));
- BOOST_CHECK(decoded != dst);
+ BOOST_CHECK(!(decoded == dst));
@ftrader
ftrader / difficultySim_default_to_cw144.patch
Last active November 5, 2017 19:09
Patch to Tom Zander's difficultySim to set cw144 as default on startup
diff --git a/chain.cpp b/chain.cpp
index f99f380..aabf36f 100755
--- a/chain.cpp
+++ b/chain.cpp
@@ -12,7 +12,7 @@ Chain::Chain(QObject *parent) : QObject(parent),
m_baseDifficulty(-1),
m_emergencyCount(0),
m_height(-1),
- m_algo(Satoshi),
+ m_algo(cw144),
pr28 - 0) at genesis: 0x1c0fffff
pr28 - 1) at 2049: 0x1c0fffff
pr28 - 2+(1) at 2050: 0x1c0fffff
pr28 - 2+(2) at 2051: 0x1c0fffff
pr28 - 2+(3) at 2052: 0x1c0fffff
pr28 - 2+(4) at 2053: 0x1c0fffff
pr28 - 2+(5) at 2054: 0x1c0fffff
pr28 - 2+(6) at 2055: 0x1c0fffff
pr28 - 2+(7) at 2056: 0x1c0fffff
pr28 - 2+(8) at 2057: 0x1c0fffff
diff --git a/src/test/pow_tests.cpp b/src/test/pow_tests.cpp
index 5dce4af..659885a 100644
--- a/src/test/pow_tests.cpp
+++ b/src/test/pow_tests.cpp
@@ -10,6 +10,7 @@
#include "util.h"
#include <boost/test/unit_test.hpp>
+#include <boost/format.hpp>
@ftrader
ftrader / get_ABC_diff_to_Core_base.sh
Created July 1, 2017 19:07
Tool to obtain diff of Bitcoin ABC to similarly formatted baseline Core commit(to eliminate as much as possible the formatting changes from the diff)
#!/bin/bash
#
# Copyright (c) 2017 freetrader (freetrader@tuta.io)
# This script is placed in the public domain.
#
# It obtains the difference between the reformatted Core baseline commit
# on top of which Bitcoin ABC was developed.
#
# After running this script, you should have a 'abc_diff_to_core_base'
# subfolder, in which there is the full .diff and the repo from which
1. rename the folder/doc to BUIP-UAHF/buip-uahf-technical-spec.md
for: freetrader, sickpig, kyuupichan, deadalnix
2. update REQ-3 based on the NOTE attached to it (limit fork block to between 1MB and 8 MB)
for: freetrader, solex, kyuupichan, deadalnix
against: peterrizun (based on later comments)
3. replace REQ-4-1 text with just an error to prevent startup if user EB is < 8MB (i.e. implement its NOTE 2)
for: freetrader, deadalnix
peterrizun mentioned he felt the note can be ignored
#!/bin/bash
# searches all .{h,cpp} files in src/ and prints out lines longer than
# hard limit which contain a // comment
HARD_LIMIT=120 # hard line length limit
find src \( -name "*.h" -o -name "*.cpp" \) | \
while read f
do
echo "$f:"
@ftrader
ftrader / illustration_of_nbits_fix_that_passes_invalidtxrequest.patch
Created December 4, 2016 22:29
sample nbits fix for invalidtxrequest.py
diff --git a/qa/rpc-tests/invalidtxrequest.py b/qa/rpc-tests/invalidtxrequest.py
index 26ca2f6..9fe6db4 100755
--- a/qa/rpc-tests/invalidtxrequest.py
+++ b/qa/rpc-tests/invalidtxrequest.py
@@ -15,6 +15,8 @@ import time
In this test we connect to one node over p2p, and test tx requests.
'''
+FORKHEIGHT=100 # to analyse fork interference
+