Skip to content

Instantly share code, notes, and snippets.

View dexX7's full-sized avatar

dexX7

View GitHub Profile
@dexX7
dexX7 / txpos.cpp
Created February 26, 2015 20:56
Block and transaction position
Value BlockPositionToJSON(const uint256& hash)
{
CTransaction tx;
uint256 hashBlock = 0;
if (!GetTransaction(hash, tx, hashBlock, true))
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "No information available about transaction");
int nHeight = 0;
int nPosition = -1;
@dexX7
dexX7 / omnicore_build_v0.0.9.1-rel.md
Last active August 29, 2015 14:16
Deterministic building: Omni Core v0.0.9.1-rel
@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>

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 / 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;
@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 / 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 / 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 / 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 / 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