def sign_tx(tx)
      if privkey
        logger.info "signing tx", tx: tx, account: self
        tx.sign privkey
      else
        raise ValueError, "Locked account cannot sign tx"
      end
    end
def sign_tx(tx)
      if privkey
        logger.info "signing tx", tx: tx, account: self
        tx.sign privkey
      else
        raise ValueError, "Locked account cannot sign tx"
      end
    end
Sign a Transaction with the private key of this account.

 If the account is unlocked, this is equivalent to
 `tx.sign(account.privkey)`.

 @param tx [Transaction] the transaction to sign
 @raise [ValueError] if the account is locked