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

2
peer.php

@ -93,7 +93,7 @@ if ($peers = $curlPeer->getAll()) { @@ -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'));

Loading…
Cancel
Save