Further reduce header dependencies
[novacoin.git] / src / wallet.cpp
index f8338b7..53836be 100644 (file)
@@ -6,6 +6,7 @@
 #include "wallet.h"
 #include "walletdb.h"
 #include "crypter.h"
+#include "ui_interface.h"
 
 using namespace std;
 
@@ -1121,7 +1122,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend, CW
                         return false;
 
                 // Limit size
-                unsigned int nBytes = ::GetSerializeSize(*(CTransaction*)&wtxNew, SER_NETWORK);
+                unsigned int nBytes = ::GetSerializeSize(*(CTransaction*)&wtxNew, SER_NETWORK, PROTOCOL_VERSION);
                 if (nBytes >= MAX_BLOCK_SIZE_GEN/5)
                     return false;
                 dPriority /= nBytes;