farhad2161 / Randbit

Generate random bitcoin private key and check it's balance automatically.
72 stars 41 forks source link

Local Node #7

Closed Tywors closed 2 years ago

Tywors commented 2 years ago

Hello, how can configure for check in local node? thanks!

farhad2161 commented 2 years ago

Hi, You should modify bitnet.py file. Modify this method get_balance like this

def get_balance(self, address):
  ...
  elif self.api_url == "localnode":
    result = self.get_balance_local_node(address)
  ...

Then add another method:

def get_balance_local_node(self, address):
  # Do what ever you need to get balance from your local node

And finally modify the config.ini like this:

API_SITE =localnode

Have fun