13

I want to test some api calls using web3.js and so I am using geth as HttpProvider. Can I start geth without the syncing?

Is something like geth --nosync --rpc available?

eth
  • 85,679
  • 53
  • 285
  • 406
niksmac
  • 9,673
  • 2
  • 40
  • 72

1 Answers1

15

geth --maxpeers 0 will not sync. geth --maxpeers 0 console may be more helpful and will bring you the console: you don't even need the RPC, and can paste in and execute Javascript.

eth
  • 85,679
  • 53
  • 285
  • 406
  • there are other command line options to tweak, you also may want to speed up mining to make your testing faster. See http://ethereum.stackexchange.com/questions/1217/whats-the-fastest-way-to-mine-a-transaction-so-i-can-test-contracts-quickly – Paul S Feb 23 '16 at 03:34
  • 1
    I'm really close to having a Docker image for the purposes of using geth for API and solidity testing. Will let you know – Paul S Feb 23 '16 at 03:37
  • @eth When I try this I can't send eth. I have empty chaindata and it looks like the block gas limit is stale. How can I send eth without syncing? – spraff Jul 27 '19 at 10:40