# This example does an AJAX lookup and is in CoffeeScript
$('.typeahead').typeahead(
# source can be a function
source: (typeahead, query) ->
# this function receives the typeahead object and the query string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Do nothing if the WALLET_PASSWORD var is not set. | |
if [ -z "$PASSWORD" ]; then | |
echo "[lnd_unlock] Please set PASSWORD in order to unlock wallet automatically." | |
s6-pause | |
fi | |
# output script content for easier debugging. | |
# set -x | |
# exit from script if error was raised. | |
set -e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class EnumSymbol { | |
sym = Symbol.for(name); | |
value: number; | |
description: string; | |
constructor(name: string, {value, description}) { | |
if(!Object.is(value, undefined)) this.value = value; | |
if(description) this.description = description; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Import dependencies | |
*/ | |
const { EventEmitter } = require('events'); | |
const ReconnectingWebSocket = require('reconnecting-websocket'); | |
/** | |
* Export a function that creates a websocket connection interface | |
*/ | |
export default function createReconnectingWebsocket(uri) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BOOT2DOCKER_CERTS_DIR=/var/lib/boot2docker/certs | |
CERTS_DIR=/etc/ssl/certs | |
CAFILE=${CERTS_DIR}/ca-certificates.crt | |
for cert in $(/bin/ls -1 ${BOOT2DOCKER_CERTS_DIR}); do | |
SRC_CERT_FILE=${BOOT2DOCKER_CERTS_DIR}/${cert} | |
CERT_FILE=${CERTS_DIR}/${cert} | |
HASH_FILE=${CERTS_DIR}/$(/usr/local/bin/openssl x509 -noout -hash -in ${SRC_CERT_FILE} 2>/dev/null) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* WHY? - BECAUSE EXCEPTIONS/TRY/CATCH IS A GLOBAL HORRIBLE MESS :-( | |
* Check out error handling in golang: https://blog.golang.org/error-handling-and-go | |
*/ | |
/** | |
* Wrap an "unsafe" promise | |
*/ | |
function safePromise(promise) { | |
return promise |
The following toolkit makes getting started with Drivechain TestDrive easier and more fun!
- SideShift (Source): Swap coins from beteeen any Drivechain (side)chain!
- Faucet (Source): Get free Drivenet coins
- Auto Installer: Automatic installer for Drivechain (with sidechains) for Ubuntu Linux (with GUI)
- Transaction Replayer (stats) (Source): Stats for the bot that replays Bitcoin (BTC) transactions onto Drivecain mainchain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# AutoTestDrive v7 | |
# Automation Drivechain TestDrive installation for Ubuntu | |
# Uses Drivenet-9, UTXO-7, Sidechain-8, Payment-1 | |
# | |
# Changelog | |
# | |
# Revision 8 | |
# - Do not restore wallet unless revision 8 | |
# - Fix typo in wallet restore code (payment restored sidechain wallet) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install_chef_server.sh | |
# | |
# From list post by John Merrells <john@merrells.com> | |
# Modified by Mike Bailey <mike@bailey.net.au> | |
logfile="/root/log.txt" | |
echo "-----" >> $logfile | |
# New sources.list | |
cat > /etc/apt/sources.list << EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp | |
index ec398f662..6724399c0 100644 | |
--- a/src/policy/policy.cpp | |
+++ b/src/policy/policy.cpp | |
@@ -117,6 +117,10 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason, const bool witnes | |
return false; | |
} | |
+ if (tx.ReplayProtected()) { | |
+ return false; |