Skip to content

Commit

Permalink
chore: Minor changes as requested in PR hirosystems#253
Browse files Browse the repository at this point in the history
  • Loading branch information
jbencin committed Apr 13, 2023
1 parent 202e580 commit 8369a9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/chainstate/stacks/db/blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4735,8 +4735,8 @@ impl StacksChainState {
let deposit_op_failed = match &value {
Value::Response(r) => r.committed == false,
_ => {
// TODO: Do anything for the case where `value` is not of type `Value::Response()`?
warn!("DepositFt op returned unexpected value"; "value" => %value);
// Public functions should always return type `Response`
error!("DepositFt op returned unexpected value"; "value" => %value);
false
}
};
Expand Down Expand Up @@ -4817,8 +4817,8 @@ impl StacksChainState {
let deposit_op_failed = match &value {
Value::Response(r) => r.committed == false,
_ => {
// TODO: Do anything for the case where `value` is not of type `Value::Response()`?
warn!("DepositNft op returned unexpected value"; "value" => %value);
// Public functions should always return type `Response`
error!("DepositNft op returned unexpected value"; "value" => %value);
false
}
};
Expand Down
6 changes: 4 additions & 2 deletions testnet/stacks-node/src/tests/l1_observer_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2764,6 +2764,7 @@ fn nft_deposit_failure_and_refund_integration_test() {
);

// Publish subnet contract for nft-token
// This contract is modified so that deposits to subnet always fail
let subnet_nft_content =
include_str!("../../../../core-contracts/contracts/helper/simple-nft-l2-no-deposit.clar");
let subnet_nft_publish = make_contract_publish(
Expand Down Expand Up @@ -3721,8 +3722,8 @@ fn ft_deposit_and_withdraw_integration_test() {
);
assert_eq!(amount, Value::okay(Value::UInt(5)).unwrap());

// Check that the subnet contract no longer owns any tokens. It should have
// transferred the 1 that it had, then minted the remaining 3.
// Check that the subnet contract no longer owns any tokens
// It should have transferred the 3 that it had
let res = call_read_only(
&l1_rpc_origin,
&user_addr,
Expand Down Expand Up @@ -3864,6 +3865,7 @@ fn ft_deposit_failure_and_refund_integration_test() {
);

// Publish subnet contract for ft-token
// This contract is modified so that deposits to subnet always fail
let subnet_simple_ft =
include_str!("../../../../core-contracts/contracts/helper/simple-ft-l2-no-deposit.clar");
let subnet_ft_publish = make_contract_publish(
Expand Down

0 comments on commit 8369a9e

Please sign in to comment.