Skip to content

Commit

Permalink
Clarified behavior of individual freeze
Browse files Browse the repository at this point in the history
  • Loading branch information
vvysokikh1 committed Nov 22, 2024
1 parent 805102a commit ba87028
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/test/app/Freeze_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -771,36 +771,39 @@ class Freeze_test : public beast::unit_test::suite
env(trust(A1, G1["USD"](0), tfSetFreeze));
env.close();

// Issuer and A1 can send payments to each other
env(pay(A1, G1, G1["USD"](1)));
// env(pay(G1, A1, G1["USD"](1))); // BUG: seems like
env.close();

// Issuer and A2 must not be affected
env(pay(A2, G1, G1["USD"](1)));
env(pay(G1, A2, G1["USD"](1)));
env.close();

// A1 can send tokens to the issuer
env(pay(A1, G1, G1["USD"](1)));
env.close();
// A1 can send tokens to A2
env(pay(A1, A2, G1["USD"](1)));
env.close();

// Issuer cannot sent tokens to A1
env(pay(G1, A1, G1["USD"](1)), ter(tecPATH_DRY));
// A2 cannot send tokens to A1
env(pay(A2, A1, G1["USD"](1)), ter(tecPATH_DRY));

if (features[featureDeepFreeze])
{
// A1 deep freezes trust line
env(trust(A1, G1["USD"](0), tfSetDeepFreeze));
// Issuer and A1 can send payments to each other
env.close();

// A1 can still send token to issuer
env(pay(A1, G1, G1["USD"](1)));
// env(pay(G1, A1, G1["USD"](1))); // BUG: seems like
env.close();

// A1 cannot send tokens to A2
env(pay(A1, A2, G1["USD"](1)), ter(tecPATH_DRY));
// Issuer cannot send tokens to A1
env(pay(G1, A1, G1["USD"](1)), ter(tecPATH_DRY));
// A2 cannot send tokens to A1
env(pay(A2, A1, G1["USD"](1)), ter(tecPATH_DRY));
// A1 cannot send tokens to A2
env(pay(A1, A2, G1["USD"](1)), ter(tecPATH_DRY));
}
}

Expand Down

0 comments on commit ba87028

Please sign in to comment.