@@ -154,8 +154,8 @@ bool CLASS::populate(const transaction& tx) const NOEXCEPT
154154 BC_ASSERT (!tx.is_coinbase ());
155155
156156 auto result = true ;
157- const auto & ins = * tx.inputs_ptr ();
158- std::for_each (ins. begin (), ins. end (), [&](const auto & in) NOEXCEPT
157+ const auto & ins = tx.inputs_ptr ();
158+ std::for_each (ins-> begin (), ins-> end (), [&](const auto & in) NOEXCEPT
159159 {
160160 result &= populate (*in);
161161 });
@@ -166,16 +166,16 @@ bool CLASS::populate(const transaction& tx) const NOEXCEPT
166166TEMPLATE
167167bool CLASS::populate (const block& block) const NOEXCEPT
168168{
169- const auto & txs = * block.transactions_ptr ();
170- if (txs. empty ())
169+ const auto & txs = block.transactions_ptr ();
170+ if (txs-> empty ())
171171 return false ;
172172
173173 auto result = true ;
174- std::for_each (std::next (txs. begin ()), txs. end (),
174+ std::for_each (std::next (txs-> begin ()), txs-> end (),
175175 [&](const auto & tx) NOEXCEPT
176176 {
177- const auto & ins = * tx->inputs_ptr ();
178- std::for_each (ins. begin (), ins. end (), [&](const auto & in) NOEXCEPT
177+ const auto & ins = tx->inputs_ptr ();
178+ std::for_each (ins-> begin (), ins-> end (), [&](const auto & in) NOEXCEPT
179179 {
180180 result &= populate (*in);
181181 });
@@ -225,8 +225,8 @@ bool CLASS::populate_with_metadata(const transaction& tx,
225225 const tx_link& link) const NOEXCEPT
226226{
227227 auto result = true ;
228- const auto & ins = * tx.inputs_ptr ();
229- std::for_each (ins. begin (), ins. end (), [&](const auto & in) NOEXCEPT
228+ const auto & ins = tx.inputs_ptr ();
229+ std::for_each (ins-> begin (), ins-> end (), [&](const auto & in) NOEXCEPT
230230 {
231231 result &= populate_with_metadata (*in, link);
232232 });
@@ -240,37 +240,37 @@ bool CLASS::populate_with_metadata(const transaction& tx) const NOEXCEPT
240240 BC_ASSERT (is_coinbase (tx));
241241
242242 // A coinbase tx is allowed only one input.
243- const auto & input = * tx.inputs_ptr ()->front ();
243+ const auto & input = tx.inputs_ptr ()->front ();
244244
245245 // Find any confirmed unspent duplicates of tx (unspent_coinbase_collision).
246246 const auto ec = unspent_duplicates (tx);
247247 if (ec == error::integrity)
248248 return false ;
249249
250250 // The prevout of a coinbase is null (not an output of a coinbase tx).
251- input. metadata .coinbase = false ;
252- input. metadata .spent = (ec != error::unspent_coinbase_collision);
253- input. metadata .median_time_past = max_uint32;
254- input. metadata .height = zero;
251+ input-> metadata .coinbase = false ;
252+ input-> metadata .spent = (ec != error::unspent_coinbase_collision);
253+ input-> metadata .median_time_past = max_uint32;
254+ input-> metadata .height = zero;
255255 return true ;
256256}
257257
258258TEMPLATE
259259bool CLASS::populate_with_metadata (const block& block) const NOEXCEPT
260260{
261- const auto & txs = * block.transactions_ptr ();
262- if (txs. empty ())
261+ const auto & txs = block.transactions_ptr ();
262+ if (txs-> empty ())
263263 return false ;
264264
265265 auto result = true ;
266- const auto coinbase = populate_with_metadata (txs. front ());
267- std::for_each (std::next (txs. begin ()), txs. end (),
266+ const auto coinbase = populate_with_metadata (txs-> front ());
267+ std::for_each (std::next (txs-> begin ()), txs-> end (),
268268 [&](const auto & tx) NOEXCEPT
269269 {
270270 const auto link = to_tx (tx.get_hash ());
271271 result &= !link.is_terminal ();
272- const auto & ins = * tx->inputs_ptr ();
273- std::for_each (ins. begin (), ins. end (), [&](const auto & in) NOEXCEPT
272+ const auto & ins = tx->inputs_ptr ();
273+ std::for_each (ins-> begin (), ins-> end (), [&](const auto & in) NOEXCEPT
274274 {
275275 result &= populate_with_metadata (*in, link);
276276 });
@@ -743,15 +743,15 @@ code CLASS::set_code(tx_link& out_fk, const transaction& tx) NOEXCEPT
743743 const auto & key = tx.get_hash (false );
744744
745745 // Declare puts record.
746- const auto & ins = * tx.inputs_ptr ();
747- const auto & outs = * tx.outputs_ptr ();
746+ const auto & ins = tx.inputs_ptr ();
747+ const auto & outs = tx.outputs_ptr ();
748748 table::puts::slab puts{};
749- puts.spend_fks .reserve (ins. size ());
750- puts.out_fks .reserve (outs. size ());
749+ puts.spend_fks .reserve (ins-> size ());
750+ puts.out_fks .reserve (outs-> size ());
751751
752752 // Declare spends buffer.
753753 std_vector<foreign_point> spends{};
754- spends.reserve (ins. size ());
754+ spends.reserve (ins-> size ());
755755
756756 // TODO: eliminate shared memory pointer reallocations.
757757 // ========================================================================
@@ -765,13 +765,13 @@ code CLASS::set_code(tx_link& out_fk, const transaction& tx) NOEXCEPT
765765
766766 // Allocate spend records.
767767 // Clean single allocation failure (e.g. disk full).
768- const auto count = possible_narrow_cast<spend_link::integer>(ins. size ());
768+ const auto count = possible_narrow_cast<spend_link::integer>(ins-> size ());
769769 auto spend_fk = store_.spend .allocate (count);
770770 if (spend_fk.is_terminal ())
771771 return error::tx_spend_allocate;
772772
773773 // Commit input records (spend records not indexed).
774- for (const auto & in: ins)
774+ for (const auto & in: * ins)
775775 {
776776 // Commit input record.
777777 // Safe allocation failure, blob linked by unindexed spend.
@@ -833,7 +833,7 @@ code CLASS::set_code(tx_link& out_fk, const transaction& tx) NOEXCEPT
833833 }
834834
835835 // Commit output records.
836- for (const auto & out: outs)
836+ for (const auto & out: * outs)
837837 {
838838 // Safe allocation failure, blob unlinked.
839839 output_link output_fk{};
@@ -864,8 +864,8 @@ code CLASS::set_code(tx_link& out_fk, const transaction& tx) NOEXCEPT
864864 {
865865 {},
866866 tx,
867- system::possible_narrow_cast<ix::integer>(ins. size ()),
868- system::possible_narrow_cast<ix::integer>(outs. size ()),
867+ system::possible_narrow_cast<ix::integer>(ins-> size ()),
868+ system::possible_narrow_cast<ix::integer>(outs-> size ()),
869869 puts_fk
870870 }))
871871 {
@@ -888,7 +888,7 @@ code CLASS::set_code(tx_link& out_fk, const transaction& tx) NOEXCEPT
888888 if (address_enabled ())
889889 {
890890 auto output_fk = puts.out_fks .begin ();
891- for (const auto & out: outs)
891+ for (const auto & out: * outs)
892892 {
893893 // Safe allocation failure, unindexed tx outputs linked by address,
894894 // others unlinked. A replay of committed addresses without indexed
0 commit comments