From b6b56320bf23575499a4ffdae16dc88e1fd5535c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Tue, 1 Jun 2021 20:27:09 +0200 Subject: [PATCH] Fix StateComputeDataCommitment --- storage/adapter_storage_miner.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/storage/adapter_storage_miner.go b/storage/adapter_storage_miner.go index f4d1e0038bc..3ebe874a9ea 100644 --- a/storage/adapter_storage_miner.go +++ b/storage/adapter_storage_miner.go @@ -147,15 +147,7 @@ func (s SealingAPIAdapter) StateComputeDataCommitment(ctx context.Context, maddr return cid.Undef, xerrors.Errorf("failed to unmarshal TipSetToken to TipSetKey: %w", err) } - ts, err := s.delegate.ChainGetTipSet(ctx, tsk) - if err != nil { - return cid.Cid{}, err - } - - // using parent ts because the migration won't be run on the first nv13 - // tipset we apply StateCall to (because we don't run migrations in StateCall - // and just apply to parent state) - nv, err := s.delegate.StateNetworkVersion(ctx, ts.Parents()) + nv, err := s.delegate.StateNetworkVersion(ctx, tsk) if err != nil { return cid.Cid{}, err }