Browse Source

delegate CRC32 encrypting to mysql server

main
D4708 4 years ago
parent
commit
3ca148ec3e
  1. 2
      model/ip.php
  2. 2
      peer.php

2
model/ip.php

@ -109,7 +109,7 @@ class ModelIp extends Model {
`inbound` = ?, `inbound` = ?,
`version` = ?, `version` = ?,
`subVersion` = ?, `subVersion` = ?,
`subVersionCRC32` = ?, `subVersionCRC32` = CRC32(?),
`syncNode` = ?, `syncNode` = ?,
`timeAdded` = UNIX_TIMESTAMP()'); `timeAdded` = UNIX_TIMESTAMP()');

2
peer.php

@ -93,7 +93,7 @@ if ($peers = $curlPeer->getAll()) {
(int) $peer['inbound'], (int) $peer['inbound'],
(int) $peer['version'], (int) $peer['version'],
preg_replace('/[^\d]/', '', $peer['subver']), preg_replace('/[^\d]/', '', $peer['subver']),
crc32($peer['subver']), $peer['subver'],
(isset($peer['syncnode']) ? (int) $peer['syncnode'] : 0)); (isset($peer['syncnode']) ? (int) $peer['syncnode'] : 0));
} else { } else {
$modelLog->add(_('Could not extract peer address or port')); $modelLog->add(_('Could not extract peer address or port'));

Loading…
Cancel
Save