| 298 | |
| 299 | |
| 300 | bool ExtractDestination(const COutPoint out, const CScript& script, CTxDestination& addressRet, txnouttype* typeRet) { |
| 301 | if (!typeRet) { |
| 302 | txnouttype type; |
| 303 | typeRet = &type; |
| 304 | } |
| 305 | if (ExtractDestination(script, addressRet, typeRet)) |
| 306 | return true; |
| 307 | if (*typeRet == TX_CREATE) { |
| 308 | addressRet = CKeyID(uint160(LuxState::createLuxAddress(uintToh256(out.hash), out.n).asBytes())); |
| 309 | // std::cout << CBitcoinAddress(addressRet).ToString()<< " " << out.hash.GetHex() << " " << out.n << std::endl; |
| 310 | return true; |
| 311 | } |
| 312 | return false; |
| 313 | } |
| 314 | |
| 315 | bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet, txnouttype *typeRet) |
| 316 | { |