@@ -314,22 +314,26 @@ defmodule FabricGen do
314314 txus = Enum . map ( entry . txs , & Map . put ( & 1 , :tx_cost , TX . exec_cost ( 0 , & 1 ) ) )
315315 { rtx , m , m_rev , l } = RDB . apply_entry ( db , next_entry_trimmed_map ,
316316 Application . fetch_env! ( :ama , :trainer_pk ) , Application . fetch_env! ( :ama , :trainer_sk ) , txus ,
317- Application . fetch_env! ( :ama , :testnet ) , Map . keys ( Application . fetch_env! ( :ama , :keys_by_pk ) )
317+ ! ! Application . fetch_env! ( :ama , :testnet ) , Map . keys ( Application . fetch_env! ( :ama , :keys_by_pk ) )
318318 )
319319 rebuild_m_fn = fn ( m ) ->
320320 Enum . map ( m , fn ( inner ) ->
321321 op = :"#{ IO . iodata_to_binary ( inner [ ~c" op" ] ) } "
322322 case op do
323- :set_bit -> % { op: op , key: IO . iodata_to_binary ( inner [ ~c" key" ] ) , value: :erlang . binary_to_integer ( "#{ inner [ ~c" value" ] } " ) , bloomsize: :erlang . binary_to_integer ( "#{ inner [ ~c" bloomsize" ] } " ) }
324- :clear_bit -> % { op: op , key: IO . iodata_to_binary ( inner [ ~c" key" ] ) , value: :erlang . binary_to_integer ( "#{ inner [ ~c" value" ] } " ) }
325- :delete -> % { op: op , key: IO . iodata_to_binary ( inner [ ~c" key" ] ) }
326- :put -> % { op: op , key: IO . iodata_to_binary ( inner [ ~c" key" ] ) , value: IO . iodata_to_binary ( inner [ ~c" value" ] ) }
323+ :set_bit -> % { op: op , table: IO . iodata_to_binary ( inner [ ~c " table " ] ) , key: IO . iodata_to_binary ( inner [ ~c" key" ] ) , value: :erlang . binary_to_integer ( "#{ inner [ ~c" value" ] } " ) , bloomsize: :erlang . binary_to_integer ( "#{ inner [ ~c" bloomsize" ] } " ) }
324+ :clear_bit -> % { op: op , table: IO . iodata_to_binary ( inner [ ~c " table " ] ) , key: IO . iodata_to_binary ( inner [ ~c" key" ] ) , value: :erlang . binary_to_integer ( "#{ inner [ ~c" value" ] } " ) }
325+ :delete -> % { op: op , table: IO . iodata_to_binary ( inner [ ~c " table " ] ) , key: IO . iodata_to_binary ( inner [ ~c" key" ] ) }
326+ :put -> % { op: op , table: IO . iodata_to_binary ( inner [ ~c " table " ] ) , key: IO . iodata_to_binary ( inner [ ~c" key" ] ) , value: IO . iodata_to_binary ( inner [ ~c" value" ] ) }
327327 end
328328 end )
329329 end
330330 rebuild_l_fn = fn ( m ) ->
331331 Enum . map ( m , fn ( inner ) ->
332+ if entry . header . height >= 416_00000 do
333+ % { error: IO . iodata_to_binary ( inner [ "error" ] ) , gas_used: IO . iodata_to_binary ( inner [ "gas_used" ] ) }
334+ else
332335 % { error: :"#{ IO . iodata_to_binary ( inner [ "error" ] ) } " }
336+ end
333337 end )
334338 end
335339 m = rebuild_m_fn . ( m )
@@ -345,7 +349,7 @@ defmodule FabricGen do
345349 #m = m ++ m_exit
346350 #m_rev = m_rev ++ m_exit_rev
347351
348- mutations_hash = ConsensusKV . hash_mutations ( l ++ m )
352+ mutations_hash = ConsensusKV . hash_mutations ( next_entry . header . height , l ++ m )
349353
350354 RocksDB . put ( "temporal_tip" , next_entry . hash , % { rtx: rtx , cf: cf . sysconf } )
351355
0 commit comments