GithubHelp home page GithubHelp logo

Comments (5)

matiu avatar matiu commented on July 18, 2024

Hi Kyle,

Could you check the output of:

curl http://127.0.0.1:3001/api/sync

just to be sure that the sync process have finished?

Please note that in your start command line there is a typo in (INSIGHT_NEORK
should be INSIGHT_NETWORK), I think that could be the problem:

$ BITCOIND_HOST=162.243.232.141 BITCOIND_P2P_PORT=19001
BITCOIND_PORT=19011 BITCOIND_USER=getthelump BITCOIND_PASS=outtahere
INSIGHT_NETWORK=testnet node insight.js

Could you try again?

Finally, please check that insight is able to connect to bitcoind thru P2P
(you will see that on the logs, stdout by default). Once the tx or the
block containing the tx are relayed, you should see the balance updated.

thanks.

On Fri, Feb 28, 2014 at 10:16 PM, Kyle Drake [email protected]:

I tried hooking up insight-api to a private testnet instance, and it
doesn't show any information for the address after it's synchronized:

$ bitcoind sendtoaddress mnjyvqvUi3BoqfE1GQrKVt6UTqTw9RyAyU 1

$ curl http://127.0.0.1:3001/api/addr/mnjyvqvUi3BoqfE1GQrKVt6UTqTw9RyAyU
{"balanceSat":0,"totalReceivedSat":0,"totalSentSat":0,"unconfirmedBalanceSat":0,"txApperances":0,"unconfirmedTxApperances":0,"transactions":[],"addrStr":"mnjyvqvUi3BoqfE1GQrKVt6UTqTw9RyAyU","totalSent":0,"balance":0,"totalReceived":0,"unconfirmedBalance":0}

When I try to look for it via watchonly it works:

bitcoind -datadir=1 importaddress mnjyvqvUi3BoqfE1GQrKVt6UTqTw9RyAyU derp true
bitcoind -datadir=1 listunspent 0 1

[ {
"txid" : "b6f10dc2e330029259125137ecc3a21a30f9c06d65d9df31625c38f3802bc3b9",
"vout" : 1,
"address" : "mnjyvqvUi3BoqfE1GQrKVt6UTqTw9RyAyU",
"account" : "derp",
"scriptPubKey" : "76a9144f3fa6f9adad31613645f47225e9abe2144ee3ed88ac",
"amount" : 1.00000000,
"confirmations" : 0,
"spendable" : false
}
]

When I try to restart insight, it crashes:

~/code/insight-api $ BITCOIND_HOST=162.243.232.141 BITCOIND_P2P_PORT=19001 BITCOIND_PORT=19011 BITCOIND_USER=getthelump BITCOIND_PASS=outtahere INSIGHT_NEORK=testnet node insight.js
info - socket.io started
insight server listening on port 3001 in development mode
Counting connected blocks. This could take some minutes

assert.js:92
throw new assert.AssertionError({
^
AssertionError: "undefined" == true
at async.doWhilst.self.startBlock (/Users/kyledrake/code/insight-api/lib/HistoricSync.js:248:13)
at /Users/kyledrake/code/insight-api/node_modules/async/lib/async.js:636:17
at /Users/kyledrake/code/insight-api/lib/HistoricSync.js:235:22
at /Users/kyledrake/code/insight-api/lib/BlockDb.js:189:32
at /Users/kyledrake/code/insight-api/lib/Rpc.js:89:42
at IncomingMessage. (/Users/kyledrake/code/insight-api/node_modules/bitcore/RpcClient.js:190:9)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:920:16
at process._tickCallback (node.js:415:13)

You can use the same server I used, because it's our public private test
http://faucet.coinpunk.com


Reply to this email directly or view it on GitHubhttps://github.com//issues/8
.

Matías Alejo Garcia
Skype/Twitter: @EMATIU
Roads? Where we're going, we don't need roads!

from insight-api.

kyledrake avatar kyledrake commented on July 18, 2024

It's synced up, yeah. The INSIGHT_NETWORK was fixed and it still does this.

Results of the curl command to check sync:

$ curl http://127.0.0.1:3001/api/sync
{"status":"syncing","blockChainHeight":62270,"syncPercentage":100,"syncedBlocks":64145,"error":null,"type":"from .dat Files","startTs":1394063405801,"endTs":null}

Another person at the Bitcoin Hackathon is having the same crash issue I believe.

from insight-api.

matiu avatar matiu commented on July 18, 2024

I think I know that is happening.
You need to resync from scratch.

Could you please run:

util/sync -D

or (if it is not there):
node_modules/insight-bitcore-api/util/sync -D

?

That will delete insight's DB, and start for 0.

we will modify the sync procedure to do this automatically if the condition
arise.

On Wed, Mar 5, 2014 at 8:53 PM, Kyle Drake [email protected] wrote:

It's synced up, yeah. The INSIGHT_NETWORK was fixed and it still does this.

Results of the curl command to check sync:

$ curl http://127.0.0.1:3001/api/sync
{"status":"syncing","blockChainHeight":62270,"syncPercentage":100,"syncedBlocks":64145,"error":null,"type":"from .dat Files","startTs":1394063405801,"endTs":null}

Another person at the Bitcoin Hackathon is having the same crash issue I
believe.


Reply to this email directly or view it on GitHubhttps://github.com//issues/8#issuecomment-36809708
.

Matías Alejo Garcia
Skype/Twitter: @EMATIU
Roads? Where we're going, we don't need roads!

from insight-api.

matiu avatar matiu commented on July 18, 2024

PS: I just pull request the fix:

#9

This should automatically recover from the condition you mention.

On Wed, Mar 5, 2014 at 11:42 PM, Matias Alejo Garcia [email protected]:

I think I know that is happening.
You need to resync from scratch.

Could you please run:

util/sync -D

or (if it is not there):
node_modules/insight-bitcore-api/util/sync -D

?

That will delete insight's DB, and start for 0.

we will modify the sync procedure to do this automatically if the
condition arise.

On Wed, Mar 5, 2014 at 8:53 PM, Kyle Drake [email protected]:

It's synced up, yeah. The INSIGHT_NETWORK was fixed and it still does
this.

Results of the curl command to check sync:

$ curl http://127.0.0.1:3001/api/sync
{"status":"syncing","blockChainHeight":62270,"syncPercentage":100,"syncedBlocks":64145,"error":null,"type":"from .dat Files","startTs":1394063405801,"endTs":null}

Another person at the Bitcoin Hackathon is having the same crash issue I
believe.


Reply to this email directly or view it on GitHubhttps://github.com//issues/8#issuecomment-36809708
.

Matías Alejo Garcia
Skype/Twitter: @EMATIU
Roads? Where we're going, we don't need roads!

Matías Alejo Garcia
Skype/Twitter: @EMATIU
Roads? Where we're going, we don't need roads!

from insight-api.

matiu avatar matiu commented on July 18, 2024

Closing this: old & no activity.

from insight-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.