(data_size, prev_bid=None)
return bid
Prompt user for a bid to transmit the given data size

    Args:
        data_size : Size of the transmit data in bytes
        prev_bid  : Previous bid, if any

    Returns:
        Bid in millisatoshis
Prompt user for a bid to transmit the given data size
Prompt user for a bid to transmit the given data size
def ask_bid(data_size, prev_bid=None):
    """Prompt user for a bid to transmit the given data size

    Args:
        data_size : Size of the transmit data in bytes
        prev_bid  : Previous bid, if any

    Returns:
        Bid in millisatoshis

    """
    suggested_bid = suggest_bid(data_size, prev_bid)

    print("")
    msg = "Your {}bid to transmit {:d} bytes (in millisatoshis)".format(
        ("new total " if prev_bid is not None else ""), data_size)

    while (True):
        bid = util.typed_input(msg, default=suggested_bid)
        if (validate_bid(bid, prev_bid)):
            break

    if (prev_bid is not None):
        logger.info("Bump bid by %d msat to a total of %d msat "
                    "(%.2f msat/byte)" %
                    (bid - prev_bid, bid, float(bid) / data_size))
    else:
        logger.info("Post data with bid of %d millisatoshis "
                    "(%.2f msat/byte)" % (bid, float(bid) / data_size))

    return bid
def ask_bid ( data_size , prev_bid = None ) : suggested_bid = suggest_bid ( data_size , prev_bid ) print ( "" ) msg = "Your {}bid to transmit {:d} bytes (in millisatoshis)" . format ( ( "new total " if prev_bid is not None else "" ) , data_size ) while ( True ) : bid = util . typed_input ( msg , default = suggested_bid ) if ( validate_bid ( bid , prev_bid ) ) : break if ( prev_bid is not None ) : logger . info ( "Bump bid by %d msat to a total of %d msat " "(%.2f msat/byte)" % ( bid - prev_bid , bid , float ( bid ) / data_size ) ) else : logger . info ( "Post data with bid of %d millisatoshis " "(%.2f msat/byte)" % ( bid , float ( bid ) / data_size ) ) return bid