From 4e58ce5d1bd2d25f5ab11091fe5ef2aa29a72885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Thei=C3=9Fen?= Date: Tue, 23 Jun 2020 11:46:13 +0200 Subject: [PATCH] Adapt to TransactionOutcome changes --- frame/contracts/src/exec.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frame/contracts/src/exec.rs b/frame/contracts/src/exec.rs index e24dfdfde9f13..d29b93d99a0c6 100644 --- a/frame/contracts/src/exec.rs +++ b/frame/contracts/src/exec.rs @@ -530,13 +530,14 @@ where -> ExecResult where F: FnOnce(&mut ExecutionContext) -> ExecResult { + use frame_support::storage::TransactionOutcome::*; let (output, deferred) = { let mut nested = self.nested(dest, trie_id); let output = frame_support::storage::with_transaction(|| { let output = func(&mut nested); match output { - Ok(ref rv) if rv.is_success() => (output, frame_support::storage::TransactionOutcome::Commit), - _ => (output, frame_support::storage::TransactionOutcome::Rollback), + Ok(ref rv) if rv.is_success() => Commit(output), + _ => Rollback(output), } })?; (output, nested.deferred)