Skip to content

Commit 9133829

Browse files
Seulgi Kimsgkim126
authored andcommitted
Increase the cost of creating a shard temporary
This patch precludes users from creating shards. It's a preparation for the test net. The cost must be adjusted.
1 parent a3fd922 commit 9133829

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

state/src/impls/top_level.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,12 @@ impl TopLevelState {
460460
Err(error) => Err(error.into()),
461461
},
462462
Action::CreateShard => {
463-
let shard_creation_cost = 1.into(); // FIXME: Make shard creation cost configurable
463+
// FIXME: Make shard creation cost configurable
464+
#[cfg(test)]
465+
let shard_creation_cost = 1.into();
466+
#[cfg(not(test))]
467+
let shard_creation_cost = U256::max_value();
468+
464469
self.create_shard(&shard_creation_cost, fee_payer)?;
465470
Ok(ParcelInvoice::SingleSuccess)
466471
}

0 commit comments

Comments
 (0)