From 7c88763f28d5a93963c658fb8f7643ced96c7022 Mon Sep 17 00:00:00 2001 From: Kleissner Date: Fri, 27 Aug 2021 17:38:36 +0200 Subject: [PATCH] Minor fix when creating new blockchain, initializing used public key --- Block Records.go | 2 ++ Blockchain.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Block Records.go b/Block Records.go index 1033184..32c0cdf 100644 --- a/Block Records.go +++ b/Block Records.go @@ -380,6 +380,8 @@ const ( ProfileFieldAddress = 5 // Physical address ) +// BlockRecordProfileBlob is similar to BlockRecordProfileField but contains binary objects instead of text. +// It can be used for example to store a profile picture on the blockchain. type BlockRecordProfileBlob struct { Type uint16 // See ProfileBlobX constants. Data []byte // The data diff --git a/Blockchain.go b/Blockchain.go index 9b282b7..b80ae3a 100644 --- a/Blockchain.go +++ b/Blockchain.go @@ -71,6 +71,8 @@ func initUserBlockchain() { // First run: create header signature! userBlockchainHeader.height = 0 userBlockchainHeader.version = 0 + userBlockchainHeader.publicKey = peerPublicKey + if err := blockchainHeaderWrite(userBlockchainDB, peerPrivateKey, userBlockchainHeader.height, userBlockchainHeader.version); err != nil { Filters.LogError("initUserBlockchain", "initializing user blockchain: %s", err.Error()) os.Exit(1)