Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sync_blocks to fix failing deposittovault #1107

Merged
merged 1 commit into from
Feb 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions test/functional/feature_loan_vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,13 +547,16 @@ def test_50pctDFI_fresh_vault_takeloan_withdraw(self):

# Deposit collaterals. 50% of BTC
address = self.nodes[0].getnewaddress()
self.nodes[0].generate(1)
self.sync_blocks()
self.owner_addresses.append(address)
self.nodes[1].sendtokenstoaddress({}, { address: '1.50@BTC'})
self.nodes[1].generate(1)
self.sync_blocks()
vault_id = self.nodes[0].createvault(address, 'LOAN000A')
self.vaults.append(vault_id)
self.nodes[0].generate(1)
self.sync_blocks()
self.nodes[0].deposittovault(vault_id, address, '1.25@BTC') # 1.25@BTC as collateral factor 0.8
self.nodes[0].deposittovault(vault_id, self.accountDFI, '1@DFI')
self.nodes[0].generate(1)
Expand Down