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

Market deal metadata methods to return EX_DEAL_EXPIRED if the deal ID is used #989

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
36810e9
Proof of concept exported API for Account actor (#797)
anorth Nov 6, 2022
0f3d72f
Export stable methods for public access (#807)
arajasek Nov 7, 2022
370223b
Restrict internal APIs of all actors (#809)
arajasek Nov 7, 2022
dec77b8
Exported API method for market actor escrow/locked balance (#812)
anorth Nov 8, 2022
8542732
Power actor: Add exported getters for raw power (#810)
arajasek Nov 9, 2022
5c3ca43
Built-in market API for deal proposal metadata (#818)
anorth Nov 9, 2022
68aaba2
Call exported authenticate method from PSD (#829)
ZenGround0 Nov 11, 2022
0e18683
Drop CALLER_TYPES_SIGNABLE and signable caller validation (#821)
arajasek Nov 15, 2022
fdd6303
Market actor: Minor improvements to two exported getters (#826)
arajasek Nov 15, 2022
b26fc74
Exported API for market deal activation state (#819)
anorth Nov 15, 2022
cd33132
Paych actor: Drop account req, use AuthenticateMessage to verify sigs…
arajasek Nov 16, 2022
d6048c0
Account actor: Deprecate AuthenticateMessage (#856)
arajasek Nov 17, 2022
904bd6a
Market actor: Export PublishStorageDeals (#857)
arajasek Nov 19, 2022
d5f8048
Miner: Export several more methods (#863)
arajasek Nov 22, 2022
4a566de
Power actor: Export methods to CreateMiner and get miner counts (#868)
arajasek Nov 23, 2022
6e04569
Verifreg: Export AddVerifiedClient and GetClaims (#873)
arajasek Nov 28, 2022
fe6320c
Datacap actor: Modify exported methods (#909)
arajasek Dec 5, 2022
37cb754
fix: comments on newly exported methods (#910)
arajasek Dec 5, 2022
9d02326
Miner: Export method to GetPendingOwner
arajasek Dec 8, 2022
4c1c251
MarketNotifyDeal (#944)
ZenGround0 Dec 13, 2022
0841be4
Verifreg: Call AuthenticateMessage instead of validating siggys
arajasek Dec 15, 2022
e5e1318
Merge branch 'master' into integration/builtin-api
arajasek Dec 17, 2022
c57b032
Multisig: Do not export any functionality (#967)
arajasek Dec 19, 2022
ab4c1ae
exit code refactor
shamb0 Dec 27, 2022
0562655
use const for EX_DEAL_EXPIRED (#954)
sudo-shashank Jan 2, 2023
f17bb35
Merge branch 'integration/builtin-api' into shamb0/dev-v1-830-return-…
shamb0 Jan 5, 2023
f7c03aa
Merge remote-tracking branch 'upstream/integration/builtin-api' into …
shamb0 Jan 5, 2023
2b16c4b
upstream merge & few more refactor
shamb0 Jan 5, 2023
fae0253
remove junk whitespace
shamb0 Jan 5, 2023
0f8ad96
Merge branch 'shamb0/dev-v1-830-return-EX_DEAL_EXPIRED' of github.com…
shamb0 Jan 5, 2023
dadc9ac
reviewcomments closure
shamb0 Jan 6, 2023
2049aef
reviewcomments closure
shamb0 Jan 6, 2023
ce1aa8f
reviewcomments closure
shamb0 Jan 6, 2023
04b1d0d
Merge branch 'master' into integration/builtin-api
arajasek Jan 9, 2023
49be12c
Merge branch 'integration/builtin-api' into shamb0/dev-v1-830-return-…
anorth Jan 11, 2023
c72c178
Change runtime resolve address to return an ActorID (#549)
lyswifter Aug 29, 2022
6ea0e9e
Implement beneficiary FIP-0029 (#496)
hunjixin Aug 29, 2022
ea0a795
feat: verifreg: serialize RemoveDataCapProposalID as tuple (#574)
arajasek Aug 29, 2022
a27e13e
feat: use Type from builtin-actors when building the bundle (#583)
Stebalien Aug 29, 2022
688e147
Optimize test_vm get_actor (#585)
Aug 29, 2022
de6a225
Change runtime address parameters to a reference (#581)
lyswifter Aug 29, 2022
2947f05
Add code coverage report (#120)
vmx Aug 30, 2022
fa43752
feat: Implement FIP-0044 (#502)
arajasek Aug 31, 2022
fca02ec
feat: update sdk & shared for TokenAmount and hashing changes (#588)
Stebalien Aug 31, 2022
0e4b1e6
Use idiomatic math operations (#591)
Stebalien Sep 1, 2022
21f163e
Include datacap actor in build bundle (#613)
anorth Sep 8, 2022
a6bc589
Automatically approve built-in market as operator for all minted data…
anorth Sep 9, 2022
7ee0e95
Implemented verified registry token receiver hook (#601)
anorth Sep 9, 2022
913a599
Datacap mint method returns mint result (#625)
anorth Sep 11, 2022
8a23c67
Verifreg uses a constant for datacap token actor addr, rather than st…
anorth Sep 11, 2022
799c4d4
Use ActorID rather than addresses in new verifreg state (#626)
anorth Sep 11, 2022
4ed2c7e
Raise market allowance infinite constant (#628)
ZenGround0 Sep 12, 2022
5eb201a
Adapt sector info and weight calculation for fip 0045 (#637)
ZenGround0 Sep 14, 2022
920c22b
Update token library (#647)
anorth Sep 14, 2022
e6b31e3
Verifreg GetClaims method (#655)
ZenGround0 Sep 14, 2022
a3cdc7f
Market actor transfers datacap and makes verified allocations for dea…
anorth Sep 15, 2022
572ef21
Delete deprecated UseBytes and RestoreBytes methods from verified reg…
anorth Sep 16, 2022
e7161cb
Implement verified claim term extension by client (#669)
anorth Sep 19, 2022
4b43357
Remove all expired allocations for a client when none specified (#671)
anorth Sep 20, 2022
fb7d59d
Remove ineffective optimisation of HAMT writes in ExtendClaimTerms (#…
anorth Sep 20, 2022
239fec1
feat: replace usize with u32 (#699)
arajasek Sep 21, 2022
988f197
Expiration Extension for fip45 (#653)
ZenGround0 Sep 21, 2022
de646c5
Implement extension of claims by spending new datacap (#685)
anorth Sep 22, 2022
8164f11
Traits and impls for adding context and exit codes to results. (#589)
anorth Sep 1, 2022
b765a10
test runtime: use Rc<MemoryBlockstore>. (#599)
Stebalien Sep 2, 2022
47da457
randomness change vector to fix length byte array (#560)
lyswifter Sep 8, 2022
179b814
fix: check code both with all targets and without (#622)
Stebalien Sep 8, 2022
c5dc047
Replace unvalidatebitfield to bitfield to avoid validating when state…
lyswifter Sep 11, 2022
b54eebd
chore: update deps for FVM release and bitfield optimizations (#638)
Stebalien Sep 13, 2022
3e42cf8
optimized tests & ci caching (#640)
Stebalien Sep 13, 2022
e5b7db3
build: avoid RUSTFLAGS (#642)
Stebalien Sep 13, 2022
fe440be
build: optimize bitfield operations in tests (#643)
Stebalien Sep 13, 2022
6c879d3
WithdrawBalance fails when beneficiary is expired or out of quota (#602)
geoff-vball Sep 14, 2022
abb573c
feat: use consts for addrs (#660)
Stebalien Sep 16, 2022
c6d456a
Replace actors cids to builtin.types in mockruntime (#629)
lyswifter Sep 16, 2022
1e2ff1f
fix: make the empty array CID const and export it (#668)
Stebalien Sep 20, 2022
b204cf8
chore: rev codecov cache (#688)
Stebalien Sep 20, 2022
33ccd71
test: correctly compute the f2 address in the test vm (#686)
Stebalien Sep 20, 2022
96fcf25
Enable Forward Compatibility methods and add tests (#650)
Sep 21, 2022
4f44a5f
fix: datacap actor: fix caller validation (#703)
geoff-vball Sep 22, 2022
f669e3c
Implement removal of expired claims. (#705)
anorth Sep 23, 2022
38ed9fe
Update token libraries to v1.0.0 (#706)
anorth Sep 27, 2022
9ae2008
Feat/drop claims (#718)
ZenGround0 Sep 28, 2022
07c522f
Claim verifreg allocations from miner actor (#715)
ZenGround0 Sep 28, 2022
9a5c840
Forgotten commit for the #650 (#702)
Sep 22, 2022
badea22
Add missing traits to actor state structs (#701)
connormullett Sep 22, 2022
932cea5
Change the complexity scaling of reschedule recovered search (#677)
Sep 23, 2022
836486e
Optimization for #636 | Perform HAMT SHA256 hashes natively via a sys…
shamb0 Sep 26, 2022
3bcf43e
Merge in latest master
ZenGround0 Sep 28, 2022
5500477
Update anyhow to 1.0.65 (#716)
anorth Sep 28, 2022
bc336c2
Add integration test for change beneficiary and withdraw balance (#582)
hunjixin Sep 29, 2022
0259bd2
Expand verified registry unit tests (#717)
anorth Sep 29, 2022
ac0b1ff
Partial integration test for verified claims (#719)
anorth Sep 29, 2022
8eab50a
Verified registry burns datacap tokens received for successful claim …
anorth Oct 3, 2022
0132db0
Datacap token allows governor (verifreg) to transfer its tokens. (#728)
anorth Oct 3, 2022
3a9f73d
Update token state (#731)
ZenGround0 Oct 3, 2022
7e36c97
Expand verified claim test to cover extension and dropping claims (#729)
anorth Oct 3, 2022
570b393
Implement state checks for allocs/claims and between verified registr…
anorth Oct 5, 2022
4ab8c4b
Integration test for expired allocation (#737)
anorth Oct 6, 2022
ab3da4e
Claim drop test (#727)
ZenGround0 Oct 7, 2022
8e221a6
Datacap integration tests (#735)
ZenGround0 Oct 7, 2022
f529730
Legacy sector tests (#742)
ZenGround0 Oct 10, 2022
f889fc8
Exercise extend2 with all old extend1 tests (#746)
ZenGround0 Oct 10, 2022
f02c805
Add claim cleanup to fip 0045 integration test (#749)
ZenGround0 Oct 12, 2022
4bbd326
Finish datacap tests (#747)
ZenGround0 Oct 14, 2022
474cd93
BatchReturn tests (#753)
ZenGround0 Oct 14, 2022
7315256
Integration tests of snap deals and claims (#751)
ZenGround0 Oct 14, 2022
fe58e97
Remaining FIP 45 state invariant checks (#752)
ZenGround0 Oct 14, 2022
46a3394
MapMap test (#755)
ZenGround0 Oct 17, 2022
678f8a3
fix: Add runtime caller validation for change_beneficiary (#761)
geoff-vball Oct 18, 2022
a70623c
Fix: make bump-version and make set-version (#765)
geoff-vball Oct 19, 2022
04f3d48
fix: notaries cannot remove datacap from verifreg (#784)
geoff-vball Oct 26, 2022
afcd255
chore: set version to v10 (#791)
Stebalien Oct 29, 2022
5bafeff
datacap: fix Name and Symbol methods (#794)
arajasek Oct 31, 2022
4724d63
datacap: add allowance to exported methods (#795)
arajasek Oct 31, 2022
a4fbc00
datacap: test invoking allowance (#800)
arajasek Oct 31, 2022
c0c20fd
test: make the mock runtime generic over the blockstore (#802)
Stebalien Nov 1, 2022
75a3ee5
feat: refactor blockstore into associated type (#803)
Stebalien Nov 1, 2022
180f2a5
Implement Drop as a safeguard for programmer errors (#618)
maciejwitowski Nov 8, 2022
cc96faa
chore: miner: fix comment in light of FIP-0029 (#649)
arajasek Nov 27, 2022
42b5bb9
feat: enable opt-level-3 (#898)
Stebalien Dec 2, 2022
c260586
Remove the market actor state mutation pattern (#734)
shamb0 Dec 5, 2022
f678790
fix: avoid double-panic on test failure (#929)
Stebalien Dec 8, 2022
fbb3613
Proof of concept exported API for Account actor (#797)
anorth Nov 6, 2022
07bdeb4
Export stable methods for public access (#807)
arajasek Nov 7, 2022
c2e93aa
Restrict internal APIs of all actors (#809)
arajasek Nov 7, 2022
79da520
Exported API method for market actor escrow/locked balance (#812)
anorth Nov 8, 2022
4ee861c
Power actor: Add exported getters for raw power (#810)
arajasek Nov 9, 2022
9d7e11f
Built-in market API for deal proposal metadata (#818)
anorth Nov 9, 2022
249d199
Call exported authenticate method from PSD (#829)
ZenGround0 Nov 11, 2022
0926c38
Drop CALLER_TYPES_SIGNABLE and signable caller validation (#821)
arajasek Nov 15, 2022
19530ed
Market actor: Minor improvements to two exported getters (#826)
arajasek Nov 15, 2022
b0d8827
Exported API for market deal activation state (#819)
anorth Nov 15, 2022
f28a05a
Paych actor: Drop account req, use AuthenticateMessage to verify sigs…
arajasek Nov 16, 2022
0dd7c15
Account actor: Deprecate AuthenticateMessage (#856)
arajasek Nov 17, 2022
0dec85b
Market actor: Export PublishStorageDeals (#857)
arajasek Nov 19, 2022
3c97f62
Miner: Export several more methods (#863)
arajasek Nov 22, 2022
fd97a31
Power actor: Export methods to CreateMiner and get miner counts (#868)
arajasek Nov 23, 2022
99fe77a
Verifreg: Export AddVerifiedClient and GetClaims (#873)
arajasek Nov 28, 2022
eeb1e12
Datacap actor: Modify exported methods (#909)
arajasek Dec 5, 2022
df79b2f
fix: comments on newly exported methods (#910)
arajasek Dec 5, 2022
d868c3d
Miner: Export method to GetPendingOwner
arajasek Dec 8, 2022
fa0dbf6
MarketNotifyDeal (#944)
ZenGround0 Dec 13, 2022
06c0c09
Verifreg: Call AuthenticateMessage instead of validating siggys
arajasek Dec 15, 2022
7070c0e
test_vm: drop usage of the Cbor trait
arajasek Dec 6, 2022
6d05f82
Drop Cbor impl for method params and return types
arajasek Dec 6, 2022
d613cde
Verifreg and Market to use ActorID in AllocationRequest (#936)
sudo-shashank Dec 14, 2022
b6adb24
Introduce macros for actor dispatch code
arajasek Dec 14, 2022
da6bfaf
fix: don't verify mock runtime when already panicing (#951)
Stebalien Dec 14, 2022
7adffe8
Update frc46_token, fvm_actor_utils, and frc42_dispatch
arajasek Dec 13, 2022
025ea74
Removed chaos actor code (#956)
sudo-shashank Dec 15, 2022
41cb5a8
use universal (de)serializer for Policy (#957)
LesnyRumcajs Dec 15, 2022
4ada9e6
Purge all uses of Cbor trait (#960)
anorth Dec 15, 2022
442b3e7
Use Option<IpldBlock> for all message params (#913)
arajasek Dec 16, 2022
69dd506
Multisig: Do not export any functionality (#967)
arajasek Dec 19, 2022
efd9e24
exit code refactor
shamb0 Dec 27, 2022
6870eee
use const for EX_DEAL_EXPIRED (#954)
sudo-shashank Jan 2, 2023
ea70c80
upstream merge & few more refactor
shamb0 Jan 5, 2023
87504ba
remove junk whitespace
shamb0 Jan 5, 2023
0e8566b
reviewcomments closure
shamb0 Jan 6, 2023
8041d28
reviewcomments closure
shamb0 Jan 6, 2023
e4a9ca3
reviewcomments closure
shamb0 Jan 6, 2023
69a9274
Remove unused macro (#969)
arajasek Dec 19, 2022
8f2a226
Upgade Rust to 1.64 (master) (#973)
mriise Dec 19, 2022
47fee6b
Refactor: Actors now return Option<IpldBlock> (#987)
arajasek Dec 19, 2022
aa083b4
Address review
arajasek Jan 11, 2023
c7f4279
FIP-0050: API between user-programmed actors and built-in actors (#1…
arajasek Jan 12, 2023
4b6b558
Implement log initialisation inline in FVM runtime (#1019)
anorth Jan 12, 2023
62b8132
chore: update hamt & amt (#1052)
Stebalien Jan 14, 2023
88acd83
Market actor batch datacap token transfers (#722)
swift-mx Jan 18, 2023
c5e51cb
Avoid redundant read/write of allocation/claims HAMT root when unchan…
anorth Jan 18, 2023
1821bc7
feat: improve dispatch macro (#1088)
Stebalien Jan 20, 2023
c107b0b
feat: allow ActorErrors to carry optional data (#1093)
arajasek Jan 24, 2023
9692ad2
Use is_controlling_address in actors (#948)
sudo-shashank Jan 24, 2023
dcb878a
Update to FVM SDK 3.0.0-alpha.22, shared 3.0.0-alpha.17, ipld_encodin…
arajasek Jan 25, 2023
e094196
feat: Partial implementation of FIP-0048 (f4/delegated addresses) (#1…
arajasek Jan 30, 2023
d5d64e6
feat: runtime: Add send_generalized (#1126)
arajasek Jan 30, 2023
a07aa05
feat: runtime: Add read_only getter (#1127)
arajasek Jan 30, 2023
b9abdfb
refactor: Runtime: Move create and state into default impl (#1133)
arajasek Jan 30, 2023
d276afc
test_vm: support creating actors over placeholders (#1131)
arajasek Jan 31, 2023
a898584
rebase to upstream master
shamb0 Jan 31, 2023
bb06eac
rebase to upstream & review comments closure
shamb0 Jan 31, 2023
af148d6
rebase to upstream & review comments closure
shamb0 Jan 31, 2023
6364afd
rebase to upstream & review comments closure
shamb0 Jan 31, 2023
6efa19d
cargo.lock updates
shamb0 Jan 31, 2023
5cd66fb
Remove old comment
anorth Jan 31, 2023
8e920e3
Merge branch 'master' into shamb0/dev-v1-830-return-EX_DEAL_EXPIRED
anorth Jan 31, 2023
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
20 changes: 12 additions & 8 deletions actors/market/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ impl Actor {
validate_and_return_deal_space(
&proposals,
&sector.deal_ids,
st.next_id,
&miner_addr,
sector.sector_expiry,
curr_epoch,
Expand Down Expand Up @@ -516,6 +517,7 @@ impl Actor {
validate_and_return_deal_space(
&proposals,
&params.deal_ids,
st.next_id,
&miner_addr,
params.sector_expiry,
curr_epoch,
Expand All @@ -542,9 +544,7 @@ impl Actor {
));
}

let proposal = st
.find_proposal(rt.store(), deal_id)?
.ok_or_else(|| actor_error!(not_found, "no such deal_id: {}", deal_id))?;
let proposal = st.get_proposal(rt.store(), deal_id)?;

let propc = rt_deal_cid(rt, &proposal)?;

Expand Down Expand Up @@ -696,9 +696,7 @@ impl Actor {
let deal_ids = st.get_deals_for_epoch(rt.store(), i)?;

for deal_id in deal_ids {
let deal = st.find_proposal(rt.store(), deal_id)?.ok_or_else(|| {
actor_error!(not_found, "proposal doesn't exist ({})", deal_id)
})?;
let deal = st.get_proposal(rt.store(), deal_id)?;

let dcid = rt_deal_cid(rt, &deal)?;

Expand Down Expand Up @@ -974,7 +972,6 @@ impl Actor {
terminated: state.slash_epoch,
}),
None => {
// State::get_proposal will fail with USR_NOT_FOUND in either case.
let maybe_proposal = st.find_proposal(rt.store(), params.id)?;
match maybe_proposal {
Some(_) => Ok(GetDealActivationReturn {
Expand Down Expand Up @@ -1030,6 +1027,7 @@ fn compute_data_commitment<BS: Blockstore>(
pub fn validate_and_return_deal_space<BS: Blockstore>(
proposals: &DealArray<BS>,
deal_ids: &[DealID],
next_id: DealID,
shamb0 marked this conversation as resolved.
Show resolved Hide resolved
miner_addr: &Address,
sector_expiry: ChainEpoch,
sector_activation: ChainEpoch,
Expand All @@ -1051,7 +1049,13 @@ pub fn validate_and_return_deal_space<BS: Blockstore>(
let proposal = proposals
.get(*deal_id)
.context_code(ExitCode::USR_ILLEGAL_STATE, "failed to load deal")?
.ok_or_else(|| actor_error!(not_found, "no such deal {}", deal_id))?;
.ok_or_else(|| {
if deal_id < &next_id {
ActorError::unchecked(EX_DEAL_EXPIRED, format!("deal {} expired", deal_id))
} else {
actor_error!(not_found, "no such deal {}", deal_id)
}
})?;

validate_deal_can_activate(proposal, miner_addr, sector_expiry, sector_activation)
.with_context(|| format!("cannot activate deal {}", deal_id))?;
Expand Down
13 changes: 9 additions & 4 deletions actors/market/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use std::collections::BTreeMap;

use super::policy::*;
use super::types::*;
use super::{DealProposal, DealState};
use super::{DealProposal, DealState, EX_DEAL_EXPIRED};

pub enum Reason {
ClientCollateral,
Expand Down Expand Up @@ -213,9 +213,14 @@ impl State {
store: &BS,
id: DealID,
) -> Result<DealProposal, ActorError> {
let found = self
.find_proposal(store, id)?
.with_context_code(ExitCode::USR_NOT_FOUND, || format!("no such deal {}", id))?;
let found = self.find_proposal(store, id)?.ok_or_else(|| {
if id < self.next_id {
shamb0 marked this conversation as resolved.
Show resolved Hide resolved
// If the deal ID has been used, it must have been cleaned up.
ActorError::unchecked(EX_DEAL_EXPIRED, format!("deal {} expired", id))
} else {
ActorError::not_found(format!("no such deal {}", id))
}
})?;
Ok(found)
}

Expand Down
46 changes: 45 additions & 1 deletion actors/market/tests/activate_deal_failures.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
// Copyright 2019-2022 ChainSafe Systems
// SPDX-License-Identifier: Apache-2.0, MIT

use fil_actor_market::{ActivateDealsParams, Actor as MarketActor, Method};
use fil_actor_market::{ActivateDealsParams, Actor as MarketActor, Method, State, EX_DEAL_EXPIRED};
use fil_actors_runtime::network::EPOCHS_IN_DAY;
use fil_actors_runtime::runtime::builtins::Type;
use fil_actors_runtime::test_utils::*;
use fil_actors_runtime::BURNT_FUNDS_ACTOR_ADDR;
use fvm_ipld_encoding::ipld_block::IpldBlock;
use fvm_shared::address::Address;
use fvm_shared::deal::DealID;
use fvm_shared::error::ExitCode;
use fvm_shared::METHOD_SEND;

mod harness;

Expand Down Expand Up @@ -109,3 +111,45 @@ fn fail_when_deal_has_already_been_activated() {
rt.verify();
check_state(&rt);
}

#[test]
fn fail_when_deal_has_already_been_expired() {
let start_epoch = 10;
let end_epoch = start_epoch + 200 * EPOCHS_IN_DAY;
let sector_expiry = end_epoch + 100;

let mut rt = setup();
let deal_id = generate_and_publish_deal(
&mut rt,
CLIENT_ADDR,
&MinerAddresses::default(),
start_epoch,
end_epoch,
);

let deal_proposal = get_deal_proposal(&mut rt, deal_id);

let current = end_epoch + 25;
rt.set_epoch(current);
rt.expect_send(
BURNT_FUNDS_ACTOR_ADDR,
METHOD_SEND,
None,
deal_proposal.provider_collateral.clone(),
None,
ExitCode::OK,
);

cron_tick(&mut rt);

assert_deal_deleted(&mut rt, deal_id, deal_proposal);

let mut st: State = rt.get_state::<State>();
st.next_id = deal_id + 1;

expect_abort_contains_message(
EX_DEAL_EXPIRED,
"expired",
activate_deals_raw(&mut rt, sector_expiry, PROVIDER_ADDR, 0, &[deal_id]),
);
}
6 changes: 3 additions & 3 deletions actors/market/tests/market_actor_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use fil_actor_market::policy::detail::DEAL_MAX_LABEL_SIZE;
use fil_actor_market::{
deal_id_key, ext, ActivateDealsParams, Actor as MarketActor, ClientDealProposal, DealArray,
DealMetaArray, Label, MarketNotifyDealParams, Method, PublishStorageDealsParams,
PublishStorageDealsReturn, State, WithdrawBalanceParams, MARKET_NOTIFY_DEAL_METHOD,
NO_ALLOCATION_ID, PROPOSALS_AMT_BITWIDTH, STATES_AMT_BITWIDTH,
PublishStorageDealsReturn, State, WithdrawBalanceParams, EX_DEAL_EXPIRED,
MARKET_NOTIFY_DEAL_METHOD, NO_ALLOCATION_ID, PROPOSALS_AMT_BITWIDTH, STATES_AMT_BITWIDTH,
};
use fil_actors_runtime::cbor::{deserialize, serialize};
use fil_actors_runtime::network::EPOCHS_IN_DAY;
Expand Down Expand Up @@ -1362,7 +1362,7 @@ fn fail_when_deal_is_activated_but_proposal_is_not_found() {
delete_deal_proposal(&mut rt, deal_id);

rt.set_epoch(process_epoch(start_epoch, deal_id));
expect_abort(ExitCode::USR_NOT_FOUND, cron_tick_raw(&mut rt));
expect_abort(EX_DEAL_EXPIRED, cron_tick_raw(&mut rt));

check_state_with_expected(
&rt,
Expand Down