@@ -262,9 +262,9 @@ impl Runtime {
262
262
let node_id = transition. node_id ( ) ;
263
263
let transition_type = transition. transition_type ( ) ;
264
264
debug ! ( "Processing state transition {}" , node_id) ;
265
- trace ! ( "State transition: {:?}" , transition) ;
266
265
267
266
// TODO: refactoring this and move to rgb-core
267
+ let new_transition: Transition ;
268
268
match reveal {
269
269
Some ( Reveal {
270
270
blinding_factor,
@@ -321,7 +321,7 @@ impl Runtime {
321
321
. insert ( * owned_type, TypedAssignments :: Value ( revealed_assignment) ) ;
322
322
}
323
323
324
- let transition : Transition = Transition :: with (
324
+ let tmp : Transition = Transition :: with (
325
325
transition. transition_type ( ) . clone ( ) ,
326
326
transition. metadata ( ) . clone ( ) ,
327
327
transition. parent_public_rights ( ) . clone ( ) ,
@@ -330,15 +330,18 @@ impl Runtime {
330
330
transition. parent_owned_rights ( ) . clone ( ) ,
331
331
) ;
332
332
333
- state . add_transition ( witness_txid , & transition ) ;
333
+ new_transition = tmp ;
334
334
}
335
- _ => state . add_transition ( witness_txid , transition) ,
335
+ _ => new_transition = transition. clone ( )
336
336
}
337
+
338
+ trace ! ( "State transition: {:?}" , new_transition) ;
339
+ state. add_transition ( witness_txid, & new_transition) ;
337
340
trace ! ( "Contract state now is {:?}" , state) ;
338
341
339
342
trace ! ( "Storing state transition data" ) ;
340
343
data. push ( ( node_id, inputs. clone ( ) ) ) ;
341
- self . store . store_merge ( db:: TRANSITIONS , node_id, transition . clone ( ) ) ?;
344
+ self . store . store_merge ( db:: TRANSITIONS , node_id, new_transition . clone ( ) ) ?;
342
345
self . store . store_sten ( db:: TRANSITION_WITNESS , node_id, & witness_txid) ?;
343
346
344
347
trace ! ( "Indexing transition" ) ;
0 commit comments