It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
sudo python /root/.electrum/forwarder.py --config /root/.electrum/forwarder.conf
[electrum]
wallet_path = /root/.electrum/electrum.dat
password =
address = 1DCKtUCFZZCr1wCxwsYkzemQvxrUq8byps
minimum_transaction = 0.11
fee = 0.001
forwarder.py#!/usr/bin/env python
import time, thread, sys, os
import getopt
import Queue
from electrum import Wallet, Interface, WalletVerifier, SimpleConfig, WalletSynchronizer, Commands
try:
opts, args = getopt.getopt(sys.argv[1:], 'fc:', ["foreground", "config="])
except getopt.GetoptError:
print 'forwarder.py [-f|--foreground] [-c filename|--config filename]'
sys.exit(2)
foreground_scanning = False
config_file_path = "forwarder.conf"
for opt, arg in opts:
if opt in ('-f', '--foreground'):
foreground_scanning = True
elif opt in ('-c', '--config'):
config_file_path = arg
# Load the configuration file with details
import ConfigParser
forwarder_config = ConfigParser.ConfigParser()
forwarder_config.read(config_file_path)
# Load the wallet from the configured location
config_data = {'wallet_path': forwarder_config.get('electrum', 'wallet_path')}
config = SimpleConfig(config_data)
wallet = Wallet(config)
# Retrieve details about transaction sending
target_address = forwarder_config.get('electrum', 'address')
minimum_transaction = float(forwarder_config.get('electrum', 'minimum_transaction'))
fee = float(forwarder_config.get('electrum', 'fee'))
# Construct the remote Electrum interface
interface = Interface(config)
interface.start(wait = True)
interface.send([('server.peers.subscribe', [])])
# Prepare the 'commands' utility object to make operating easy
commands = Commands(wallet, interface)
# Load in the password used to decrypt the signing keys
if forwarder_config.get('electrum', 'password'):
commands.password = forwarder_config.get('electrum', 'password')
# Prepare a queue as a simple synchronization primitive to decouple update from send
queue = Queue.Queue()
# Global boolean to prevent recursive update/send events and too-early handling
global allow_put
allow_put = False
# Global number indicating the last height transactions were sent from
global last_send_height
last_send_height = 0
def on_wallet_update():
global allow_put
global last_send_height
if not allow_put:
return
if verifier.local_height == last_send_height:
#print "Last send height == local height: " + str(last_send_height)
return
queue.put(True)
# Setup the wallet's interface and hookup the wallet update callback
wallet.interface = interface
interface.register_callback('updated', on_wallet_update)
# Load in the transaction / tree verifier
verifier = WalletVerifier(interface, config)
wallet.set_verifier(verifier)
verifier.start()
# Load in the wallet synchronizer to load in new data
synchronizer = WalletSynchronizer(wallet, config)
synchronizer.start()
def try_send():
global allow_put
global last_send_height
# Collect balance information to determine if we should continue
balance = commands.getbalance()
print "Collected updated balance: " + str(balance)
confirmed = balance.get('confirmed')
if not confirmed:
confirmed = 0
else:
confirmed = float(confirmed)
unconfirmed = balance.get('unconfirmed')
if not unconfirmed:
unconfirmed = 0
else:
unconfirmed = float(unconfirmed)
print "Total Balance: " + str(confirmed + unconfirmed)
# Make sure that we have enough to cover the fee.
# Also make sure that prior unconfirmed items are enough to cover the fee
# to avoid pending withdrawals being re-spent and causing unnecessary server errors.
if (confirmed + unconfirmed) >= (minimum_transaction + fee):
# Store the last_send_height to avoid re-sending while we are waiting for it to get in the queue
print "Sending %s to %s w/ fee %s" % (confirmed + unconfirmed - fee, target_address, fee)
last_send_height = verifier.local_height
#print "New height " + str(last_send_height)
try:
print target_address
print confirmed + unconfirmed - fee
print fee
h = commands.payto(target_address, confirmed + unconfirmed - fee - 0.001, fee)
print "Transaction sent - " + str(h)
except BaseException as e:
print "Failed to send transaction: " + str(e)
except:
print "Unknown exception occurred"
# Force a full wallet update up front - then enable wallet updates
wallet.update()
allow_put = True
# Perform an initial send try to bootstrap the process
try_send()
# If foreground scanning - use loop w/ Ctrl+C break method
if foreground_scanning:
try:
while True:
ready = queue.get(True, 1000000)
if not ready:
continue
allow_put = False
try_send()
allow_put = True
except KeyboardInterrupt as e:
print "Ending server"
# Shutdown server objects
verifier.stop()
synchronizer.stop()
interface.stop()
# Due to daemon threads - follow electrum GUI rules for waiting
time.sleep(0.1)
print "terminated"
root:~# electrum getbalance
Connected to electrum.bitcoins.sk:50002
14qwj8tUBVVJ9sNqYnHSrp17z9PDywYUKN
{
"confirmed": "0.0190837"
}
root:~# electrum getbalance
Connected to electrum.bitcoins.sk:50002
14qwj8tUBVVJ9sNqYnHSrp17z9PDywYUKN
{
"confirmed": "0.0190837"
}