Skip to content

Instantly share code, notes, and snippets.

@andrewkkchan
Created June 23, 2021 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewkkchan/c77293260d0fb48e45ea5189ce86024d to your computer and use it in GitHub Desktop.
Save andrewkkchan/c77293260d0fb48e45ea5189ce86024d to your computer and use it in GitHub Desktop.
Order function at Hyper ledger Fabric
// Order accepts normal messages for ordering
func (ch *chain) Order(env *cb.Envelope, configSeq uint64) error {
select {
case ch.sendChan <- &message{
configSeq: configSeq,
normalMsg: env,
}:
return nil
case <-ch.exitChan:
return fmt.Errorf("Exiting")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment