delegate CRC32 encrypting to mysql server

This commit is contained in:
D4708 2021-05-30 14:11:35 +03:00
parent f4f9587dbd
commit 3ca148ec3e
2 changed files with 2 additions and 2 deletions

View File

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

View File

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