old_contents: import os, pickle
  from common.safeprint import safeprint
  
  bountyList = []
  
  class Bounty:
    ip = ""
    btc = ""
    reward = 0
    data = []
    
    def __init__(ipAddress, btcAddress, rewardAmount):
      ip = ipAddress
      btc = btcAddress
      reward = rewardAmount
    
    def __init__(ipAddress, btcAddress, rewardAmount, dataList):
      ip = ipAddress
      btc = btcAddress
      reward = rewardAmount
      data = dataList
    
    def addData(dataList):
      data = dataList
      
    def isValid():
      #ping ip
      #check if all fields have things
      return False
    
    def isPayable():
      #check if address has enough
      return False
  
  def saveToFile():
    if os.path.exists("bounties.pickle"):
      pickle.dump(boutyList,"bounties.pickle")
      return True
    return False
  
  def loadFromFile():
    if os.path.exists("settings.conf"):
      bountyList = pickle.load("bounties.pickle")
      return True
    return False
  
  def loadBounties():
    loadFromFile()
    if len(bountyList) is 0:
      requestBounties()
    return len(bountyList) is not 0
  
  def requestBounties(peerList):
    for peer in peerList:
      bountyList.extend(requestBounty(peer))
      
  def requestBounty(peer):
    safeprint("currently unsupported")
  
  def sendBounty(peer):
    safeprint("currently unsupported")
    if len(bountyList) is 0:
      loadBounties()
    #send bounties
    dumpBounties()
  
  def getBounty(charity, factor):
    for bounty in bountyList:
      if best is None:
        best = bounty
      elif best.rewardAmount < bounty.rewardAmount and bounty.isValid() and (isPayable(factor) or charity):
        best = bounty
    return best
  
new_contents: import os, pickle, re
  from common.safeprint import safeprint
  
  bountyList = []
  
  class Bounty:
    ip = ""
    btc = ""
    reward = 0
    data = []
    
    def __init__(self, ipAddress, btcAddress, rewardAmount, dataList=[]):
      self.ip = ipAddress
      self.btc = btcAddress
      self.reward = rewardAmount
      self.data = dataList
      
    def isValid(self):
      try:
        safeprint("Testing IP address")
        #is IP valid
        b = int(self.ip.split(":")[1])
        b = int(self.ip.split(":")[0].split(".")[0])
        b = int(self.ip.split(":")[0].split(".")[1])
        b = int(self.ip.split(":")[0].split(".")[2])
        b = int(self.ip.split(":")[0].split(".")[3])
        #ping IP
        #is Bitcoin address valid
        safeprint("Testing Bitcoin address")
        address = str(self.btc)
        if not re.match(re.compile("^[a-zA-Z1-9]{27,35}$"),address):
  	return False
        #is reward valid
        safeprint("Testing reward")
        b = int(self.reward)
        return True
      except:
        return False
    
    def isPayable(self):
      #check if address has enough
      return False
  
  def verify(string):
    test = pickle.loads(string)
    try:
      safeprint("Testing IP address")
      #is IP valid
      b = int(test.ip.split(":")[1])
      b = int(test.ip.split(":")[0].split(".")[0])
      b = int(test.ip.split(":")[0].split(".")[1])
      b = int(test.ip.split(":")[0].split(".")[2])
      b = int(test.ip.split(":")[0].split(".")[3])
      #ping IP
      #is Bitcoin address valid
      safeprint("Testing Bitcoin address")
      address = str(test.btc)
      if not re.match(re.compile("^[a-zA-Z1-9]{27,35}$"),address):
        return False
      #is reward valid
      safeprint("Testing reward")
      b = int(test.reward)
      return True
    except:
      return False
  
  def saveToFile():
    if os.path.exists("bounties.pickle"):
      pickle.dump(boutyList,"bounties.pickle")
      return True
    return False
  
  def loadFromFile():
    if os.path.exists("settings.conf"):
      bountyList = pickle.load("bounties.pickle")
      return True
    return False
  
  def loadBounties():
    loadFromFile()
    if len(bountyList) is 0:
      requestBounties()
    return len(bountyList) is not 0
  
  def requestBounties(peerList):
    for peer in peerList:
      bountyList.extend(requestBounty(peer))
      
  def requestBounty(peer):
    safeprint("currently unsupported")
  
  def sendBounty(peer):
    safeprint("currently unsupported")
    if len(bountyList) is 0:
      loadBounties()
    #send bounties
    dumpBounties()
  
  def getBounty(charity, factor):
    for bounty in bountyList:
      if best is None:
        best = bounty
      elif best.rewardAmount < bounty.rewardAmount and bounty.isValid() and (isPayable(factor) or charity):
        best = bounty
    return best
  
subject: Fix bounty constructor; add verification; NO PING