@@ -142,6 +142,23 @@ code CLASS::set_code(const tx_link& tx_fk, const transaction& tx) NOEXCEPT
142142
143143 // Commit points (hashmap).
144144 {
145+ // //if (!tx.is_coinbase())
146+ // //{
147+ // // const auto ptr = store_.point.get_memory();
148+ // // for (const auto& in: *ins)
149+ // // {
150+ // // // Extract integer and modulo to get % of points.
151+ // // // Simulates bloom filtering false positive duplicate confirm.
152+ // // if (to_bool(unique_hash(in->point().hash()) % 1_size))
153+ // // continue;
154+ // //
155+ // // // In a normal test run it will not exist (cb excluded above).
156+ // // // Return failure to ensure this is not elided by the compiler.
157+ // // if (store_.point.exists(ptr, in->point()))
158+ // // return error::confirmed_double_spend;
159+ // // }
160+ // //}
161+
145162 // Expand synchronizes keys with ins_fk, entries dropped into same offset.
146163 // Allocate contiguous points (at sequential keys matching ins_fk).
147164 if (!store_.point .expand (ins_fk + inputs))
@@ -150,27 +167,12 @@ code CLASS::set_code(const tx_link& tx_fk, const transaction& tx) NOEXCEPT
150167 // This must be set after tx.set and before tx.commit, since searchable and
151168 // produces an association to tx.link, and is also an integral part of tx.
152169 const auto ptr = store_.point .get_memory ();
153-
154- // Collect duplicates to store in duplicate table.
155- std::vector<chain::cref_point> twins{};
156170 for (const auto & in: *ins)
157171 {
158- // /////////////////////////////////////////////////////////////////
159- // TODO: add filter to hashmap and use method here to detect and
160- // TODO: return prior existence (dup) here (insert succeeds).
161- // /////////////////////////////////////////////////////////////////
162- bool twin{};
163- if (!store_.point .put (/* twin,*/ ptr, ins_fk++, in->point (),
172+ if (!store_.point .put (ptr, ins_fk++, in->point (),
164173 table::point::record{}))
165174 return error::tx_point_put;
166-
167- if (twin)
168- twins.emplace_back (in->point ().hash (), in->point ().index ());
169175 }
170-
171- // /////////////////////////////////////////////////////////////////////
172- // TODO: if (!twins.empty()) ... store to duplicate table here.
173- // /////////////////////////////////////////////////////////////////////
174176 }
175177
176178 // Commit address index records (hashmap).
0 commit comments