update to buffertools 2.0

This commit is contained in:
Matias Alejo Garcia 2014-02-18 19:40:37 -03:00
parent c2221a9ece
commit 5230a79114
1 changed files with 4 additions and 1 deletions

View File

@ -15,6 +15,8 @@ function spec() {
var Sync = require('./Sync').class();
var sockets = require('../app/controllers/socket.js');
var BlockExtractor = require('./BlockExtractor.js').class();
var buffertools = require('buffertools');
// var bitcoreUtil = require('bitcore/util/util');
// var Deserialize = require('bitcore/Deserialize');
@ -29,7 +31,8 @@ function spec() {
var genesisHashReversed = new Buffer(32);
this.network.genesisBlock.hash.copy(genesisHashReversed);
this.genesis = genesisHashReversed.reverse().toString('hex');
buffertools.reverse(genesisHashReversed);
this.genesis = genesisHashReversed.toString('hex');
this.rpc = new RpcClient(config.bitcoind);
this.shouldBroadcast = opts.shouldBroadcastSync;