X-Git-Url: https://git.pterodactylus.net/?p=fms.git;a=blobdiff_plain;f=src%2Fglobal.cpp;h=0437eb4c5893c79223a84f60de802474de6e1bbe;hp=6430d852ead64baaca3b739ad13a1b7de878a3e4;hb=f208e33c29132aacaec448e74341edea1b925a2a;hpb=d8ccfe2b3944adf07d35534459cdda19d15217c8 diff --git a/src/global.cpp b/src/global.cpp index 6430d85..0437eb4 100644 --- a/src/global.cpp +++ b/src/global.cpp @@ -204,16 +204,14 @@ void SetupDB() );"); // low / high / message count for each board - db->Execute("DROP VIEW IF EXISTS vwBoardStats; \ - CREATE VIEW IF NOT EXISTS vwBoardStats AS \ + db->Execute("CREATE VIEW IF NOT EXISTS vwBoardStats AS \ SELECT tblBoard.BoardID AS 'BoardID', IFNULL(MIN(MessageID),0) AS 'LowMessageID', IFNULL(MAX(MessageID),0) AS 'HighMessageID', COUNT(MessageID) AS 'MessageCount' \ FROM tblBoard LEFT JOIN tblMessageBoard ON tblBoard.BoardID=tblMessageBoard.BoardID \ WHERE MessageID>=0 OR MessageID IS NULL \ GROUP BY tblBoard.BoardID;"); // calculates peer trust - db->Execute("DROP VIEW IF EXISTS vwCalculatedPeerTrust; \ - CREATE VIEW IF NOT EXISTS vwCalculatedPeerTrust AS \ + db->Execute("CREATE VIEW IF NOT EXISTS vwCalculatedPeerTrust AS \ SELECT TargetIdentityID, \ ROUND(SUM(MessageTrust*(LocalMessageTrust/100.0))/SUM(LocalMessageTrust/100.0),0) AS 'PeerMessageTrust', \ ROUND(SUM(TrustListTrust*(LocalTrustListTrust/100.0))/SUM(LocalTrustListTrust/100.0),0) AS 'PeerTrustListTrust' \ @@ -291,7 +289,7 @@ void SetupDB() // insert SomeDude's public key date.SetToGMTime(); - //db->Execute("INSERT INTO tblIdentity(PublicKey,DateAdded) VALUES('SSK@NuBL7aaJ6Cn4fB7GXFb9Zfi8w1FhPyW3oKgU9TweZMw,iXez4j3qCpd596TxXiJgZyTq9o-CElEuJxm~jNNZAuA,AQACAAE/','"+date.Format("%Y-%m-%d %H:%M:%S")+"');"); + db->Execute("INSERT INTO tblIdentity(PublicKey,DateAdded) VALUES('SSK@NuBL7aaJ6Cn4fB7GXFb9Zfi8w1FhPyW3oKgU9TweZMw,iXez4j3qCpd596TxXiJgZyTq9o-CElEuJxm~jNNZAuA,AQACAAE/','"+date.Format("%Y-%m-%d %H:%M:%S")+"');"); } @@ -360,7 +358,7 @@ void SetupDefaultOptions() // FCPHost st.Bind(0,"FCPHost"); - st.Bind(1,"localhost"); + st.Bind(1,"127.0.0.1"); st.Bind(2,"Host name or address of Freenet node."); st.Step(); st.Reset(); @@ -421,7 +419,7 @@ void SetupDefaultOptions() st.Reset(); st.Bind(0,"MinPeerMessageTrust"); - st.Bind(1,"25"); + st.Bind(1,"30"); st.Bind(2,"Specifies a peer message trust level that a peer must have before its messages will be downloaded."); st.Step(); st.Reset(); @@ -433,7 +431,7 @@ void SetupDefaultOptions() st.Reset(); st.Bind(0,"MinPeerTrustListTrust"); - st.Bind(1,"25"); + st.Bind(1,"30"); st.Bind(2,"Specifies a peer trust list trust level that a peer must have before its trust list will be included in the weighted average. Any peers below this number will be excluded from the results."); st.Step(); st.Reset();