Skip to content

Instantly share code, notes, and snippets.

View dexX7's full-sized avatar

dexX7

View GitHub Profile
@dexX7
dexX7 / gist:fbbc17482d5559b41b19
Created April 10, 2015 20:59
Omni Core: 1-of-6 bare multisig
$ gettransaction_MP bf57b06d9f2abd1c4ee51701b131b7ce87e9432901c6903b348439ad85b63986
{
"txid": "bf57b06d9f2abd1c4ee51701b131b7ce87e9432901c6903b348439ad85b63986",
"sendingaddress": "mwLDFYukA8WxvJ6UyjZ6wgvqzLsGSeoiJD",
"ismine": true,
"confirmations": 1,
"fee": 0.00011092,
"blocktime": 1428698286,
"version": 0,
"type_int": 50,
// Not a RPC call at all!
Value HandleTxCreation(const Array& params) {
bool fBroadcast = params.back().get_bool();
// actual implemenation
// ...
}
// RPC call for creation
Value tx_create(const Array& params, bool fHelp)
@dexX7
dexX7 / compiler-unchecked.java
Created April 5, 2015 21:16
With -Xlint:unchecked
Testing started at 23:09 ...
23:09:55: Executing external tasks 'cleanTest test --tests com.msgilligan.bitcoin.rpc.*'...
:bitcoin-rpc:cleanTest
warning: [options] bootstrap class path not set in conjunction with -source 1.7
~/Projects/Java/bitcoin-spock/bitcoin-rpc/src/main/java/com/msgilligan/bitcoin/rpc/RPCClient.java:99: warning: [unchecked] unchecked conversion
responseJson = mapper.readValue(connection.getInputStream(), Map.class);
^
required: Map<String,Object>
found: Map
~/Projects/Java/bitcoin-spock/bitcoin-rpc/src/main/java/com/msgilligan/bitcoin/rpc/RPCClient.java:108: warning: [unchecked] unchecked conversion
@dexX7
dexX7 / no-compiler-unchecked.java
Created April 5, 2015 21:11
No -Xlint:unchecked
Testing started at 23:08 ...
23:08:40: Executing external tasks 'cleanTest test --tests com.msgilligan.bitcoin.rpc.*'...
:bitcoin-rpc:cleanTest
warning: [options] bootstrap class path not set in conjunction with -source 1.7
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
:bitcoin-rpc:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.7
1 warning
@dexX7
dexX7 / build.sh
Last active August 14, 2017 20:43
Bitcoin Core 0.10 Build Matrix Script
# env:
MAKEJOBS=-j3
RUN_TESTS=false
RUN_SPOCK_TESTS=false
CCACHE_SIZE=100M
CCACHE_TEMPDIR=/tmp/.ccache-temp
CCACHE_COMPRESS=1
BASE_OUTDIR=$WORKSPACE/out
SDK_URL=https://bitcoincore.org/depends-sources/sdks
@dexX7
dexX7 / test_locale.py
Created March 29, 2015 06:12
[QA] Test of invalid locale environment settings
#!/usr/bin/env python2
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework import BitcoinTestFramework
from util import assert_equal, initialize_datadir
import os
import subprocess
def pretty_dict(dictionary):
@dexX7
dexX7 / gist:9f6f33444d8df1de63a5
Created March 21, 2015 12:52
Test: sort pending wallet transactions before reaccepting
https://github.com/bitcoin/bitcoin
https://gist.github.com/dexX7/06df91d1a7f99190d8d6#file-walletreaccept-py
commit f3948a30cd27928fdf9dffbbf90ea6430c869edf
Date: Fri Mar 20 16:29:26 2015 +0100
===============================================
~/Projects/Cpp/bitcoin/qa/rpc-tests$ ./walletreaccept-py
INFO:Initializing test directory /tmp/testMwserc
@dexX7
dexX7 / rpc_tests.cpp
Last active August 29, 2015 14:17
fatal error in "rpc_flex_table": memory access violation
static const CRPCCommand vRPCTestCommands[] =
{ // category name actor (function) okSafeMode reqWallet
// --------------------- ------------------------ ----------------------- ---------- ---------
{ "network", "testcmd", &ping_overwrite_tests, true, false },
};
// still unsafe
void addTestCommand()
{
unsigned int vcidx;

Omni Core v0.0.9.1-rel x64

###Important information

By default this software will use your existing Bitcoin wallet, including spending bitcoins contained therein, for example for transaction fees or trading. Please backup your existing Bitcoin wallet before using this software.

This version does not support a Bitcoin Core v0.10 blockchain due to it's out of order block storage. If you intend to share the same data directory with Bitcoin Core, please use Bitcoin Core v0.9.

This is the first experimental release of Omni Layer support in the QT UI, please be vigilant with testing and do not risk large amounts of Bitcoin and Omni Layer tokens.

@dexX7
dexX7 / json_conversion.h
Created March 4, 2015 21:58
JSON Value object conversion
#ifndef JSON_CONVERSION_H
#define JSON_CONVERSION_H
#include "rpcprotocol.h"
#include "tinyformat.h"
#include "json/json_spirit_value.h"
#include <limits>
#include <string>