Skip to content

Instantly share code, notes, and snippets.

'use strict'
var BASE_REWARD = 10000000000;
function getReward(height, interval) {
const halvings = Math.floor(height / interval);
// BIP 42 (well, our own version of it,
// since we can only handle 32 bit shifts).
// https://github.com/bitcoin/bips/blob/master/bip-0042.mediawiki
unsigned int static DeltaGravityWave(const CBlockIndex* pindexLast, const uint32_t nTime, const Consensus::Params& params)
{
/* DeltaGravityWave Difficulty Re-Adjustment Algorithm
*
* Based on a combination of:
* -- DarkGravity v3, written by Evan Duffield
* -- Delta algorithm, written by Frank (dt_cdog@yahoo.com) with adjustments by Malcolm MacLeod (mmacleod@webmail.co.za)
* */
const CBlockIndex *BlockLastSolved = pindexLast;
const CBlockIndex *BlockReading = pindexLast;
@metacoin
metacoin / FLO_getbalance_notes.md
Created May 2, 2018 20:59
FLO_getbalance_notes.md

GetBalance RPC command research notes

Main function defined in wallet.cpp

GetBalance() is defined in wallet.cpp:

CAmount CWallet::GetBalance() const 
{
    CAmount nTotal = 0;
@metacoin
metacoin / FLOhistory.md
Last active April 29, 2018 19:59
FLO history

FLO

Launched June 17th 2013, the first coin with a metadata field on the blockchain for the purpose of building blockchain applications.

A timeline of major events in FLO's history and Joseph's involvement

2013

#!/bin/bash
###
# Script made by reddit/u/ben-btc & EnterTheBlockchain.com
# Updated (v2.0) by Joseph Fiscella (metacoin) for FLO v0.15.3
# Designed for a fresh install of Ubuntu 16.04
# Modified from and special thanks to reddit/u/ymmv2 for creating the btcAutoNode script
# https://www.reddit.com/r/Bitcoin/comments/1se3zd/how_to_create_a_full_bitcoin_node_in_a_5_ubuntu/
#
# https://flo.cash
@metacoin
metacoin / multicurrency-payment-system.md
Last active February 22, 2016 14:47
System for accepting payments in multiple cryptocurrencies

multicurrency payment system

Introduction

The multicurrency payment system enables payments in multiple crypto-currencies by providing a backend structure to organize payment addresses. Payment listeners are created to constantly scan the blockchain and fire off callbacks when certain criteria is met. The multicurrency payment system facilitates easy access to cross-blockchain functionality.

Key Features

@metacoin
metacoin / global.inc.php
Last active January 4, 2016 05:19
MPOS authentication
/**
* smtp setting
*
* This will use smtp socket instead of the default php mail() function.
* Useful if you have another smtp application like dovecot on the server.
*
* Default:
* auth = 1
* server = 'servername'
* port = 25

Keybase proof

I hereby claim:

  • I am metacoin on github.
  • I am metacoin (https://keybase.io/metacoin) on keybase.
  • I have a public key whose fingerprint is 2CEF 73A0 F702 63BF 6782 364A 4228 BE5F 95C7 F42F

To claim this, I am signing this object:

@metacoin
metacoin / Alexandria Private Alpha INSTALL.md
Last active August 29, 2015 14:22
Alexandria Private Alpha INSTALL.md

Install

The Alexandria backend is distributed via binary but can also be built from source.

Binary Downloads

Coming soon.

Building Alexandria