BIP: XX
Title: Block v2, Height in Coinbase
Author: Gavin Andresen <[email protected]>
Status: Draft
Type: Standards Track
Created: 2012-07-06
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/perl -w | |
use strict; | |
my ($argv_fn); | |
my $bytes_saved = 0; | |
while ($argv_fn = shift @ARGV) { | |
&chomp_file($argv_fn); | |
} |
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
/* | |
[jgarzik@bd tmp]$ g++ -O2 -Wall -g -o mx mx.cc -lboost_thread-mt | |
[jgarzik@bd tmp]$ ./mx | |
1. foo = 42 | |
2. foo = 10 | |
3. foo = 20 | |
*/ | |
#include <cstdio> | |
#include <boost/thread.hpp> |
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
/* | |
Compile on Fedora 16 Linux: | |
g++ -O2 -Wall -g -o boostgz boostgz.cc -lboost_iostreams-mt | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <fstream> | |
#include <iostream> |
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
Sample getnetstats JSON-RPC output, just after startup and 9-block sync-up: | |
{ | |
"messages" : { | |
"addr" : [ | |
"15", | |
"286929" | |
], | |
"alert" : [ | |
"4", |
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
[ | |
{ | |
"addr" : "173.74.129.35:8333", | |
"services" : "00000001", | |
"lastsend" : 1341021734, | |
"lastrecv" : 1341021734, | |
"conntime" : 1341021329, | |
"recvbytes" : 37248, | |
"sendbytes" : 2823, | |
"version" : 32400, |
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
OP_0 104 | |
OP_1 27 | |
OP_2 12 | |
OP_2OVER 182 | |
OP_2SWAP 182 | |
OP_3 16 | |
OP_4 1 | |
OP_CHECKMULTISIG 22 | |
OP_CHECKSIG 12188693 | |
OP_CODESEPARATOR 14 |
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
OP_BOOLAND 4 | |
OP_ENDIF 37 | |
OP_8 3 | |
OP_NOP1 3 | |
OP_2DUP 6 | |
OP_ROT 9 | |
OP_4 13 | |
OP_5 12 | |
OP_6 5 | |
OP_DEPTH 25 |
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
Example mainnet configuration | |
----------------------------- | |
db=/spare/tmp/chaindb | |
log=/spare/tmp/chaindb/debug.log | |
Example testnet configuration | |
----------------------------- | |
port=18333 |
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/bitcoin/serialize.py b/bitcoin/serialize.py | |
index 6d7fc6d..13a3afd 100644 | |
--- a/bitcoin/serialize.py | |
+++ b/bitcoin/serialize.py | |
@@ -7,6 +7,7 @@ | |
# | |
import struct | |
+import hashlib | |
from Crypto.Hash import SHA256, RIPEMD160 |
OlderNewer