mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
multi: update GetInfoResponse response
Update the output of the `commit_hash` field in the GetInfoResponse. The `commit_hash` field will contain the most recent commit_hash that the build was based on. If the build had uncommitted changes, this field will contain the most recent commit hash, suffixed by "-dirty". Note that this change also changes the output of `commit` field in the `--version` command. The `Commit` field will now contain most recent git commit tag.
This commit is contained in:
parent
48a5f460b9
commit
cdcacfe753
6 changed files with 35 additions and 16 deletions
|
|
@ -1249,9 +1249,16 @@ func (s *swapClientServer) GetInfo(ctx context.Context,
|
|||
}
|
||||
}
|
||||
|
||||
commitHash := loop.CommitHash
|
||||
if loop.Dirty != "" {
|
||||
// If the build was dirty, we add a "-dirty" suffix to the
|
||||
// commit hash.
|
||||
commitHash += "-" + loop.Dirty
|
||||
}
|
||||
|
||||
return &looprpc.GetInfoResponse{
|
||||
Version: loop.Version(),
|
||||
CommitHash: loop.CommitHash(),
|
||||
CommitHash: commitHash,
|
||||
Network: s.config.Network,
|
||||
RpcListen: s.config.RPCListen,
|
||||
RestListen: s.config.RESTListen,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue