Remove unnecessary typedef and script.h include#4680
Conversation
|
NAK that bit. The typedef is a duplicate, correct. |
|
What in keystore.h requires script.h? |
|
hmmm. As I understood it, you want to include the header for references... but looking more closely, I see all references are either typedef or virtual. There is never a need for the compiler to explore or size the structure. Apologies. ut ACK |
|
Thanks, then base58.h doesn't seem to need script.h either. |
|
@jtimon script.h inclusion is only correct if the symbols are defined somewhere. The keystore.h update was correct because it included "class CScript;" The base58.h update is incorrect, as something is required to define CScriptID and CTxDestination. This gets back to direct/indirect issue that @sipa referenced in #4674. |
|
I understood the criterion in 4674, but in this case I really thought that base58.h was script.h-independent: CScriptID is declared in key.h and I missed CTxDestination. But in fact it could be easily moved with CNoDestination from script.h to key.h, since they only depends on CKeyID and CScriptID (defined in key.h). |
|
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4680_a381ee5d1c1c01c66e681e245f60f2de2b79b264/ for binaries and test log. |
a381ee5 Remove unnecessary typedef and script.h include (jtimon)
script.h is included to define CTxDestination, which is already defined in script.h and not used here.
Look like rests from a refactor waiting to be cleaned up.