Skip to content
This repository has been archived by the owner on Aug 23, 2020. It is now read-only.

Commit

Permalink
Added split bundle test
Browse files Browse the repository at this point in the history
  • Loading branch information
Brord van Wierst committed Mar 24, 2020
1 parent e47a55d commit bed7f4a
Showing 1 changed file with 42 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,45 @@ Feature: Test transaction confirmation

Then the response for "getBalances" should return with:
|keys |values |type |
|balances |1000 0 |intList |
|balances |1000 0 |intList |

Scenario: Split transaction over 2 bundles
We want to ascertain that ledger state is always calculated correctly.
Even when there is a transaction used in 2 different bundles. A split bundle is
a bundle that uses a transaction from another bundle.

Then "1" transaction is issued on "nodeA-m3" with:
|keys |values |type |
|address |TEST_ADDRESS |staticValue |
|value |0 |int |
|tag |ZERO9VALUE |string |

Then a split bundle is generated referencing the previous transaction with:
|keys |values |type |
|seed |SPLIT_BUNDLE_SEED |staticValue |
|value |2000 |int |
|tag |FAKE9VALUE |string |
|address |SPLIT_TO_ADDRESS |staticValue |

Then a transaction is issued referencing the previous transaction
|keys |values |type |
|seed |THE_BANK |staticList |
|address |TEST_ADDRESS |staticValue |
|value |11 |int |
|tag |VALUE9TRANSACTION |string |

#In the default test, the latest sent index will be 54. The next milestone issued should be 55.
When a milestone is issued with index 55 and references:
|keys |values |type |
|transactions |previousTransaction |responseValue |

#Give the node time to solidify the milestone
And we wait "15" second/seconds

Given "getBalances" is called on "nodeA-m3" with:
|keys |values |type |
|addresses |SPLIT_TO_ADDRESS |staticList |

Then the response for "getBalances" should return with:
|keys |values |type |
|balances |2000 |intList |

0 comments on commit bed7f4a

Please sign in to comment.