예제 #1
0
                    '_' + str(curunixtime),
                    payment_address=payout_address,
                    payment_amount=payout_amount,
                    start_epoch=start_epoch,
                    end_epoch=end_epoch)

print '\ntry to submit proposal with 0 confirmations'
# should be permanently rejected by all nodes

tx_hash0 = node1.rpc_command(*proposal.get_prepare_command())
print 'collateral tx hash: {0}\n'.format(tx_hash0)
log1.expect_minimum('push_inventory:tx {0}'.format(tx_hash0), 1)
cmd = [
    'gobject', 'submit', '0', '1',
    str(curunixtime),
    proposal.dashd_serialise(), tx_hash0
]

#try to submit by regular node
try:
    node2.rpc_command(*cmd)
except:
    pass
else:
    if get_confirmations(node2, tx_hash0) < 1:
        assert False, "TEST FAILED: proposal submitted with zero confirmations"

#submit by special test node
object_hash0 = node1.rpc_command(*cmd)
print '\nproposal hash: {0}\n'.format(object_hash0)
예제 #2
0
                    url='https://dashcentral.com/proposal_' + str(curblock) +
                    '_' + str(curunixtime),
                    payment_address=payout_address,
                    payment_amount=payout_amount,
                    start_epoch=start_epoch,
                    end_epoch=end_epoch,
                    govobj_type=0)

print proposal.govobj_type
proposal.govobj_type = 0

#cmd = ['gobject', 'submit', '0', '1', str(curunixtime), proposal.dashd_serialise(), '0463c5b7194605e598441422a3dc99c7c96df4c943dd047310646ae2d8c43add']
cmd = [
    'gobject', 'submit', '0', '1',
    str(curunixtime),
    proposal.dashd_serialise(),
    '0000000000000000000000000000000000000000000000000000000000000000'
]

count = 0
while True:
    try:
        object_hash = node1.rpc_command(*cmd)
    except:
        time.sleep(1)
        continue

    print 'submit invalid proposal #{0}: {1}'.format(count, object_hash)
    count += 1
    curunixtime += 1
    cmd[4] = str(curunixtime)