@@ -91,10 +91,11 @@ TEMPLATE
9191code CLASS::set_code (const tx_link& tx_fk, const transaction& tx) NOEXCEPT
9292{
9393 // This is the only multitable write query (except initialize/genesis).
94- using namespace system ;
94+
9595 if (tx.is_empty ())
9696 return error::tx_empty;
9797
98+ using namespace system ;
9899 using ix = linkage<schema::index>;
99100 const auto & ins = tx.inputs_ptr ();
100101 const auto & ous = tx.outputs_ptr ();
@@ -110,22 +111,26 @@ code CLASS::set_code(const tx_link& tx_fk, const transaction& tx) NOEXCEPT
110111
111112 // Allocate contiguously and store inputs.
112113 input_link in_fk{};
113- if (!store_.input .put_link (in_fk, table::input::put_ref{ {}, tx }))
114+ if (!store_.input .put_link (in_fk,
115+ table::input::put_ref{ {}, tx }))
114116 return error::tx_input_put;
115117
116118 // Allocate contiguously and store outputs.
117119 output_link out_fk{};
118- if (!store_.output .put_link (out_fk, table::output::put_ref{ {}, tx_fk, tx }))
120+ if (!store_.output .put_link (out_fk,
121+ table::output::put_ref{ {}, tx_fk, tx }))
119122 return error::tx_output_put;
120123
121124 // Allocate and contiguously store input links.
122125 ins_link ins_fk{};
123- if (!store_.ins .put_link (ins_fk, table::ins::put_ref{ {}, in_fk, tx_fk, tx }))
126+ if (!store_.ins .put_link (ins_fk,
127+ table::ins::put_ref{ {}, in_fk, tx_fk, tx }))
124128 return error::tx_ins_put;
125129
126130 // Allocate and contiguously store output links.
127131 outs_link outs_fk{};
128- if (!store_.outs .put_link (outs_fk, table::outs::put_ref{ {}, out_fk, tx }))
132+ if (!store_.outs .put_link (outs_fk,
133+ table::outs::put_ref{ {}, out_fk, tx }))
129134 return error::tx_outs_put;
130135
131136 // Create tx record.
@@ -151,12 +156,13 @@ code CLASS::set_code(const tx_link& tx_fk, const transaction& tx) NOEXCEPT
151156 return error::tx_point_allocate;
152157
153158 for (const auto & in: *ins)
154- if (!store_.point .put (ins_fk++, in->point (), table::point::record{}))
159+ if (!store_.point .put (ins_fk++, in->point (),
160+ table::point::record{}))
155161 return error::tx_null_point_put;
156162 }
157163 else
158164 {
159- // Expand synchronizes keys with ins_fk, entries dropped into same offset.
165+ // Expand synchronizes keys with ins_fk, entries set into same offset.
160166 // Allocate contiguous points (at sequential keys matching ins_fk).
161167 if (!store_.point .expand (ins_fk + inputs))
162168 return error::tx_point_allocate;
@@ -376,8 +382,6 @@ code CLASS::set_code(const block& block, const header_link& key,
376382
377383 code ec{};
378384 auto fk = tx_fks;
379-
380- // Each tx is set under a distinct transactor.
381385 for (const auto & tx: *block.transactions_ptr ())
382386 if ((ec = set_code (fk++, *tx)))
383387 return ec;
0 commit comments