| 27 | }; |
| 28 | |
| 29 | SpendDataType rawAddressSpendData(const blocksci::RawAddress &address, const blocksci::ScriptAccess &scripts) { |
| 30 | static auto &rawAddressSpendDataTable = *[]() { |
| 31 | auto nameTable = blocksci::make_dynamic_table<blocksci::AddressType, RawAddressSpendDataFunctor>(); |
| 32 | return new decltype(nameTable){nameTable}; |
| 33 | }(); |
| 34 | return rawAddressSpendDataTable.at(static_cast<size_t>(address.type))(address,scripts); |
| 35 | } |
| 36 | |
| 37 | AnySpendData::AnySpendData(const AnyScriptOutput &output) : wrapped(mpark::visit(SpendDataGenerator(), output.wrapped)) {} |
| 38 | |