SHA256
Восстанавливать blockchain state free-пользователей
This commit is contained in:
+15
@@ -103,6 +103,21 @@ public final class VerifiedFreeRegistrationImporter {
|
||||
insert.setString(8, login.toLowerCase(java.util.Locale.ROOT) + "-001"); insert.setLong(9, now); insert.setLong(10, now);
|
||||
insert.executeUpdate();
|
||||
}
|
||||
// blockchain_state — обязательная runtime-проекция новой цепочки.
|
||||
// Без неё первый пользовательский AddBlock (например, «О себе») будет
|
||||
// отклонён ещё до проверки подписи.
|
||||
try (PreparedStatement insert = c.prepareStatement("""
|
||||
INSERT INTO blockchain_state_store (
|
||||
login, fork_number, blockchain_key, size_limit, file_size_bytes,
|
||||
last_block_number, last_block_hash, updated_at_ms)
|
||||
VALUES (?, 1, ?, 100000, 0, -1, ?, ?)
|
||||
""")) {
|
||||
insert.setString(1, login);
|
||||
insert.setString(2, Base58Util.encode(cert.blockchainKey()));
|
||||
insert.setBytes(3, new byte[32]);
|
||||
insert.setLong(4, now);
|
||||
insert.executeUpdate();
|
||||
}
|
||||
try (PreparedStatement insert = c.prepareStatement("""
|
||||
INSERT INTO free_registration_certificate (
|
||||
data_item_id, login, namespace, email_sha256, inner_signature,
|
||||
|
||||
Reference in New Issue
Block a user